Skip to content

Instantly share code, notes, and snippets.

@compactcode
Created April 30, 2012 23:05
Show Gist options
  • Save compactcode/2563504 to your computer and use it in GitHub Desktop.
Save compactcode/2563504 to your computer and use it in GitHub Desktop.
A skeleton html file for rendering high charts from a JSON endpoint.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<script src="https://jetstar.geckoboard.com/scripts/jquery/jquery.min.js" type="text/javascript"></script>
<script src="https://jetstar.geckoboard.com/scripts/highcharts.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function() {
$.getJSON("/charts/your-endpoint.json", function(config) {
new Highcharts.Chart(config);
});
});
</script>
</head>
<body>
<div id="container">
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment