highcharts - Is it possible to change the name of "x" for x data? -
i receive data chart. unfortunately, consist of records like
{ abcisse: 5, ordonnee: 9 } which feed data.
the record above corresponds, in highcharts nomenclature,
{ x: 5, y: 9 } is possible inform highcharts should looking values of x in abcisse , values of y in ordonnee? or have postprocess data , create x , y entries?
you can use array map function convert records format need highcharts. example, if data in array called mydata feed data series.data option using...
$('#container').highcharts({ .... series: [{ data: mydata.map(function (item) {return { x: item.abcisse, y: item.ordonnee}; }) }] ... });
Comments
Post a Comment