highcharts - How could we plot graphical representation using High Charts where one x-axis value have multiple y-axis value -


how plot graphical representation using high charts 1 x-axis value have multiple y-axis value , each x-axis value number of y-axis value differs. have date on x-axis , on y-axis readings. now, have data each date, number of reading may differ different dates. today have 5 readings , yesterday 10 readings. have data date vise. , want plot on graph positive , negative values. rnd high charts this, highcharts dont show reading receptive scenario, or may didnt it. can me in this.

data have:
1) date: 1/8/2017
values:[12,56,-14,35,8]
2) date: 2/8/2017
values:[3,9,-4]
3) date: 3/8/2017
values:[8,-6,45]

thank help

you can use scatter series: https://www.highcharts.com/docs/chart-and-series-types/scatter-chart

live demo adjusted problem: http://jsfiddle.net/kkulig/c6w79bd0/

if have data composed this:

var data = [{   date: date.utc(2017, 0, 1),   values: [4, 5, 6, -2] }, {   date: date.utc(2017, 0, 2),   values: [3, -7] }, {   date: date.utc(2017, 0, 3),   values: [0, 11] }]; 

you can prepare way:

var series = {   data: [] }; data.foreach(function(day) {     day.values.foreach(function (value){     series.data.push([day.date, value]);   }); }); 

Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -