shutterstock/rickshaw — Issue #24: Can't seem to apply an x_axis to a Rickshaw.Graph.Ajax chart
Author: jeffself
Created: 2012-02-17 20:02:32+00:00
State: open

I've implemented a chart that uses a JSON file per your example. Now I'm trying to add an x axis to it, but the x-axis doesn't display. Here's what I have:

var graph = new Rickshaw.Graph.Ajax( {
element: document.getElementById("chart"),
width: 500,
height: 250,
renderer: 'line',
interpolation: 'linear',
dataURL: 'data.json',
series: [{
name: 'MyData',
color: 'steelblue'
}]
});

var x_axis = new Rickshaw.Graph.Axis.Time( { graph: graph } );

graph.render();

Any ideas?