Skip to content

Instantly share code, notes, and snippets.

@DrSleep
Created June 21, 2014 09:37
Show Gist options
  • Save DrSleep/f6da81a137836cedc322 to your computer and use it in GitHub Desktop.
Save DrSleep/f6da81a137836cedc322 to your computer and use it in GitHub Desktop.
timingEPL_13_14
<!doctype HTML>
<meta charset = 'utf-8'>
<html>
<head>
<script src='http://ramnathv.github.io/rCharts/libraries/widgets/polycharts/js/polychart2.standalone.js' type='text/javascript'></script>
<style>
.rChart {
display: block;
margin-left: auto;
margin-right: auto;
width: 600px;
height: 300px;
}
</style>
</head>
<body >
<div id = 'chart1' class = 'rChart polycharts'></div>
<script type='text/javascript'>
var chartParams = {
"dom": "chart1",
"width": 600,
"height": 300,
"layers": [
{
"x": "Time",
"y": "Value",
"data": {
"Time": [ "0-10", "11-20", "21-30", "31-40", "41-50", "51-60", "61-70", "71-80", "81-90" ],
"Value": [ 86, 100, 97, 104, 134, 120, 120, 113, 178 ],
"Type": [ "When Scored", "When Scored", "When Scored", "When Scored", "When Scored", "When Scored", "When Scored", "When Scored", "When Scored" ]
},
"facet": null,
"type": "bar",
"color": "Type"
}
],
"facet": [],
"guides": {
"x": {
"title": "",
"numticks": 9
},
"y": {
"title": ""
}
},
"coord": [],
"title": "Timing of goals in EPL Season '13-'14",
"id": "chart1"
}
_.each(chartParams.layers, function(el){
el.data = polyjs.data(el.data)
})
var graph_chart1 = polyjs.chart(chartParams);
</script>
<script></script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment