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

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -