Skip to content

Instantly share code, notes, and snippets.

@cddesja
Created December 11, 2014 12:02
Show Gist options
  • Save cddesja/780d85de91b0e8095aba to your computer and use it in GitHub Desktop.
Save cddesja/780d85de91b0e8095aba to your computer and use it in GitHub Desktop.
chart1
<!doctype HTML>
<meta charset = 'utf-8'>
<html>
<head>
<link rel='stylesheet' href='//tenxer.github.io/xcharts/css/master.css'>
<script src='//d3js.org/d3.v2.min.js' type='text/javascript'></script>
<script src='//tenxer.github.io/xcharts/js/xcharts.min.js' type='text/javascript'></script>
<style>
.rChart {
display: block;
margin-left: auto;
margin-right: auto;
width: 800px;
height: 400px;
}
</style>
</head>
<body >
<figure id = 'chart14a619681b23' class = 'rChart xcharts'></figure>
<script type='text/javascript'>
var data = {
"dom": "chart14a619681b23",
"width": 800,
"height": 400,
"xScale": "linear",
"yScale": "linear",
"main": [
{
"data": [
{
"x": 0,
"y": 4.0939e+06
},
{
"x": 364,
"y": 3.1947e+06
},
{
"x": 365,
"y": 3.1947e+06
},
{
"x": 728,
"y": 2.9897e+06
},
{
"x": 730,
"y": 2.9898e+06
},
{
"x": 1092,
"y": 2.8222e+06
},
{
"x": 1095,
"y": 2.8224e+06
},
{
"x": 1456,
"y": 2.6992e+06
},
{
"x": 1460,
"y": 2.6997e+06
},
{
"x": 1820,
"y": 2.5593e+06
},
{
"x": 1825,
"y": 2.5601e+06
},
{
"x": 2184,
"y": 2.4336e+06
},
{
"x": 2190,
"y": 2.4349e+06
},
{
"x": 2548,
"y": 2.266e+06
},
{
"x": 2555,
"y": 2.2677e+06
},
{
"x": 2912,
"y": 2.1262e+06
},
{
"x": 2920,
"y": 2.1283e+06
},
{
"x": 3276,
"y": 1.9411e+06
},
{
"x": 3285,
"y": 1.9437e+06
},
{
"x": 3640,
"y": 1.7858e+06
},
{
"x": 3650,
"y": 1.7889e+06
},
{
"x": 4004,
"y": 1.5919e+06
},
{
"x": 4015,
"y": 1.5956e+06
},
{
"x": 4368,
"y": 1.4385e+06
},
{
"x": 4380,
"y": 1.4426e+06
}
]
},
{
"data": [
{
"x": 0,
"y": 2.1271e+06
},
{
"x": 364,
"y": 8.9546e+05
},
{
"x": 365,
"y": 8.9543e+05
},
{
"x": 728,
"y": 3.5969e+05
},
{
"x": 730,
"y": 3.5977e+05
},
{
"x": 1092,
"y": 3.249e+05
},
{
"x": 1095,
"y": 3.2515e+05
},
{
"x": 1456,
"y": 2.4562e+05
},
{
"x": 1460,
"y": 2.4594e+05
},
{
"x": 1820,
"y": 66261
},
{
"x": 1825,
"y": 66361
},
{
"x": 2184,
"y": 2626.6
},
{
"x": 2190,
"y": 2631.4
},
{
"x": 2548,
"y": 350.49
},
{
"x": 2555,
"y": 351.27
},
{
"x": 2912,
"y": 10.094
},
{
"x": 2920,
"y": 10.12
},
{
"x": 3276,
"y": 0.072106
},
{
"x": 3285,
"y": 0.072323
},
{
"x": 3640,
"y": 4.0339e+05
},
{
"x": 3650,
"y": 4.0414e+05
},
{
"x": 4004,
"y": 4.8082e+05
},
{
"x": 4015,
"y": 4.8357e+05
},
{
"x": 4368,
"y": 4.6444e+05
},
{
"x": 4380,
"y": 4.676e+05
}
]
},
{
"data": [
{
"x": 0,
"y": 3.5556e+05
},
{
"x": 364,
"y": 3.5293e+05
},
{
"x": 365,
"y": 3.5293e+05
},
{
"x": 728,
"y": 3.5144e+05
},
{
"x": 730,
"y": 3.5144e+05
},
{
"x": 1092,
"y": 3.5016e+05
},
{
"x": 1095,
"y": 3.5016e+05
},
{
"x": 1456,
"y": 3.4899e+05
},
{
"x": 1460,
"y": 3.4899e+05
},
{
"x": 1820,
"y": 3.4787e+05
},
{
"x": 1825,
"y": 3.4787e+05
},
{
"x": 2184,
"y": 3.4627e+05
},
{
"x": 2190,
"y": 3.4627e+05
},
{
"x": 2548,
"y": 3.4468e+05
},
{
"x": 2555,
"y": 3.4468e+05
},
{
"x": 2912,
"y": 3.4333e+05
},
{
"x": 2920,
"y": 3.4333e+05
},
{
"x": 3276,
"y": 3.4219e+05
},
{
"x": 3285,
"y": 3.4219e+05
},
{
"x": 3640,
"y": 3.412e+05
},
{
"x": 3650,
"y": 3.412e+05
},
{
"x": 4004,
"y": 3.4026e+05
},
{
"x": 4015,
"y": 3.4026e+05
},
{
"x": 4368,
"y": 3.3947e+05
},
{
"x": 4380,
"y": 3.3947e+05
}
]
}
],
"id": "chart14a619681b23"
},
chartType = "line-dotted",
myChart = new xChart(chartType, data, '#chart14a619681b23');
</script>
<style>figure.rChart {height: 400px;}</style>
<script></script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment