Skip to content

Instantly share code, notes, and snippets.

@timelyportfolio
Created April 30, 2013 21:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save timelyportfolio/5492120 to your computer and use it in GitHub Desktop.
Save timelyportfolio/5492120 to your computer and use it in GitHub Desktop.
<!doctype HTML>
<html>
<head>
<script src='http://polychart.com/s/third_party/polychart2.standalone.js' type='text/javascript'></script>
<style>
.rChart {
display: block;
margin-left: auto;
margin-right: auto;
width: 900px;
height: 500px;
}
</style>
</head>
<body>
<div id='chart20782344c9d' class='rChart nvd3Plot polycharts'></div>
<script type='text/javascript'>
var chartParams = {
"dom": "chart20782344c9d",
"width": 800,
"height": 400,
"layers": [
{
"x": "Freq",
"y": "Age",
"data": {
"Age": [ "50-54", "55-59", "60-64", "65-69", "70-74", "50-54", "55-59", "60-64", "65-69", "70-74", "50-54", "55-59", "60-64", "65-69", "70-74", "50-54", "55-59", "60-64", "65-69", "70-74" ],
"LocationGender": [ "RuralMale", "RuralMale", "RuralMale", "RuralMale", "RuralMale", "RuralFemale", "RuralFemale", "RuralFemale", "RuralFemale", "RuralFemale", "UrbanMale", "UrbanMale", "UrbanMale", "UrbanMale", "UrbanMale", "UrbanFemale", "UrbanFemale", "UrbanFemale", "UrbanFemale", "UrbanFemale" ],
"Freq": [ 11.7, 18.1, 26.9, 41, 66, 8.7, 11.7, 20.3, 30.9, 54.3, 15.4, 24.3, 37, 54.6, 71.1, 8.4, 13.6, 19.3, 35.1, 50 ]
},
"facet": null,
"type": "point",
"color": "LocationGender"
}
],
"facet": [],
"guides": {
"y": {
"title": ""
}
},
"coord": [],
"title": "Death Rates in Virginia - 1940",
"id": "chart20782344c9d"
}
_.each(chartParams.layers, function(el){
el.data = polyjs.data(el.data)
})
var graph_chart20782344c9d = polyjs.chart(chartParams);
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment