Current state
This commit is contained in:
44
public/assets/plugins/charts-rickshaw/examples/ajax.html
Normal file
44
public/assets/plugins/charts-rickshaw/examples/ajax.html
Normal file
@@ -0,0 +1,44 @@
|
||||
<!doctype>
|
||||
<head>
|
||||
<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="https://ajax.googleapis.com/ajax/libs/jquery/1.8.1/jquery.min.js"></script>
|
||||
|
||||
<script src="../rickshaw.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div id="chart_container">
|
||||
<div id="chart"></div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
||||
var ajaxGraph = new Rickshaw.Graph.Ajax( {
|
||||
|
||||
element: document.getElementById("chart"),
|
||||
width: 400,
|
||||
height: 200,
|
||||
renderer: 'line',
|
||||
dataURL: 'data/data.json',
|
||||
onData: function(d) { d[0].data[0].y = 80; return d },
|
||||
series: [
|
||||
{
|
||||
name: 'New York',
|
||||
color: '#c05020',
|
||||
}, {
|
||||
name: 'London',
|
||||
color: '#30c020',
|
||||
}, {
|
||||
name: 'Tokyo',
|
||||
color: '#6060c0'
|
||||
}
|
||||
]
|
||||
} );
|
||||
|
||||
</script>
|
||||
|
||||
</body>
|
||||
Reference in New Issue
Block a user