Created
October 10, 2013 16:22
-
-
Save walkerke/6921200 to your computer and use it in GitHub Desktop.
Heart disease and poverty
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!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='chart1ad434747dda' class='rChart highcharts'></div> | |
<script type='text/javascript'> | |
(function($){ | |
$(function () { | |
var chart = new Highcharts.Chart({ | |
"dom": "chart1ad434747dda", | |
"width": 800, | |
"height": 400, | |
"credits": { | |
"href": null, | |
"text": null | |
}, | |
"title": { | |
"text": null | |
}, | |
"yAxis": [ | |
{ | |
"title": { | |
"text": "Average hospitalization rate", | |
"style": { | |
"color": "#DC143C" | |
} | |
} | |
}, | |
{ | |
"title": { | |
"text": "Average percentage in poverty", | |
"style": { | |
"color": "#00008B" | |
} | |
}, | |
"opposite": true | |
} | |
], | |
"xAxis": { | |
"categories": [ "Decile 1", "Decile 2", "Decile 3", "Decile 4", "Decile 5", "Decile 6", "Decile 7", "Decile 8", "Decile 9", "Decile 10" ] | |
}, | |
"series": [ | |
{ | |
"name": "Average hospitalization rate", | |
"type": "column", | |
"color": "#DC143C", | |
"data": [ 24.42, 35.16, 40.13, 44.78, 49.23, 53.02, 57.29, 62.13, 68.72, 94.69 ] | |
}, | |
{ | |
"name": "Average percentage in poverty", | |
"type": "spline", | |
"color": "#00008B", | |
"yAxis": 1, | |
"data": [ 9.95, 8.96, 10.55, 12.17, 11.73, 15.26, 15.12, 14.95, 15.47, 17.58 ], | |
"yAxis": 1 | |
} | |
], | |
"id": "chart1ad434747dda", | |
"chart": { | |
"renderTo": "chart1ad434747dda" | |
} | |
}); | |
}); | |
})(jQuery); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment