Skip to content

Instantly share code, notes, and snippets.

@reinholdsson
Created June 7, 2013 21:59
Show Gist options
  • Save reinholdsson/5732710 to your computer and use it in GitHub Desktop.
Save reinholdsson/5732710 to your computer and use it in GitHub Desktop.
<!doctype HTML>
<meta charset = 'utf-8'>
<html>
<head>
<script src='http://code.jquery.com/jquery-1.9.1.min.js' type='text/javascript'></script>
<script src='http://code.highcharts.com/highcharts.js' type='text/javascript'></script>
<script src='http://code.highcharts.com/highcharts-more.js' type='text/javascript'></script>
<style>
.rChart {
display: block;
margin-left: auto;
margin-right: auto;
width: 800px;
height: 400px;
}
</style>
</head>
<body>
<div id='chart447834a09c37' class='rChart highcharts'></div>
<script type='text/javascript'>
(function($){
$(function () {
var chart = new Highcharts.Chart({
"dom": "chart447834a09c37",
"width": 800,
"height": 400,
"credits": {
"href": null,
"text": null
},
"title": {
"text": null
},
"yAxis": [
{
"title": {
"text": ""
}
}
],
"series": [
{
"data": [
{
"y": 8,
"url": "https://github.com/metagraf/rHighcharts",
"color": "lightblue"
},
{
"y": 14,
"url": "https://github.com/metagraf/rVega",
"color": "lightpink"
},
{
"y": 71,
"url": "https://github.com/ramnathv/rCharts",
"color": "lightgreen"
}
],
"type": "column",
"name": "Number of Stars"
}
],
"plotOptions": {
"column": {
"cursor": "pointer",
"point": {
"events": {
"click": function() { location.href = this.options.url; }
}
}
}
},
"xAxis": {
"categories": [ "rHighcharts", "rVega", "rCharts" ],
"title": {
"text": ""
}
},
"legend": {
"enabled": false
},
"id": "chart447834a09c37",
"chart": {
"renderTo": "chart447834a09c37"
}
});
});
})(jQuery);
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment