I've tried a simple example with the example from rickshaw...
A rest server give back a json file... If I print it to the console its exacly the same as the one from the example :
[{
color: 'steelblue',
data: [
{ x: 0, y: 40 },
{ x: 1, y: 49 },
{ x: 2, y: 38 },
{ x: 3, y: 30 },
{ x: 4, y: 32 } ]
}]
But somehow I get alway the error " uncaught exception: series is not an array: [object Object]"
Here is my script :
var json = $.ajax({
'url': "http://127.0.0.1:8887/getMetricsJson/metricName/water_in/earliest/1398037036/latest/1398039416",
'success': function(json) {
console.log(json);
}
});
var graph = new Rickshaw.Graph( {
element: document.getElementById("chart"),
renderer: 'line',
height: 200,
width: 400,
series: json
} );
graph.render();