highcharts - Cannot read property 'cum' of undefined -- when creating a stacked area chart with xAxis.type=datetime -


when create stacked area chart datetime x-axis, see error in console, , series not drawn.

$('#container').highcharts({   chart: { type: 'area' },   plotoptions: { series: { stacking: true } },   xaxis: [ { type: 'datetime' } ],   series: [     {name:'foo', data:[1,2,3,4,5].map(function(d,i) { return {x:new date(2013,i,1),y:d*d  }; })},     {name:'bar', data:[1,2,3,4,5].map(function(d,i) { return {x:new date(2013,i,1),y:d*d*d}; })} ] }); 

here example of error: http://jsfiddle.net/bu2ej/

has encountered similar problems?

thanks

if want specify x coordinate every point, use following format of "data" :

an array of arrays 2 values example ... data: [[5, 2], [6, 3], [8, 2]]

in case, instead of doing

data:[1,2,3,4,5].map(function(d,i) { return {x:new date(2013,i,1),y:d*d  }) 

do this

data:[1,2,3,4,5].map(function(d,i) { return [new date(2013,i,1),d*d  ]; }) 

fiddle : http://jsfiddle.net/bu2ej/1/


Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -