Skip to content
972c2bd Apr 12, 2014
51 lines (40 sloc) 984 Bytes
<!doctype html>
<link type="text/css" rel="stylesheet" href="../src/css/graph.css">
<link type="text/css" rel="stylesheet" href="css/lines.css">
<script src="../vendor/d3.v3.js"></script>
<script src="../rickshaw.js"></script>
<div id="chart"></div>
<div id="preview"></div>
<script>
var seriesData = [ [], [] ];
var random = new Rickshaw.Fixtures.RandomData(150);
for (var i = 0; i < 150; i++) {
random.addData(seriesData);
}
var graph = new Rickshaw.Graph( {
element: document.getElementById("chart"),
renderer: 'area',
series: [
{
data: seriesData[0],
color: 'steelblue'
}, {
data: seriesData[1],
color: 'lightblue'
}
]
} );
var resize = function() {
graph.configure({
width: window.innerWidth * 0.75,
height: window.innerHeight * 0.75
});
graph.render();
}
var preview = new Rickshaw.Graph.RangeSlider.Preview({
graph: graph,
element: document.getElementById('preview')
});
window.addEventListener('resize', resize);
resize();
</script>
Something went wrong with that request. Please try again.