Reputation: 746
I am looking at ways to plot the following data set in highcharts, the data set may have two or more point on the same date and date are not continuous. Excel does it in a nice way but can seem to get the same out of highcharts, if there a work workaround or any other chart which can help with this.
Date Advocacy
2013-11-19 0.088367522
2013-11-14 0.208418652
2013-11-18 0.025337009
2013-11-12 0.258161724
2013-11-17 0.308902293
2013-11-18 0.224930584
2013-11-13 0.012973063
2013-11-15 0.070966072
2013-11-19 0.019120459
2013-11-12 0.0155832
2013-11-16 0.458133817
2013-11-13 0.115200795
Regards,
Ayush
Upvotes: 1
Views: 1647
Reputation: 37578
First of all data needs to be timestaps (intead od date like "2013-02-01), youc an sue Date.UTC(). Secondly need to be sorted by x, ascending. To achieve line series with duplicated x values, you need to use scatter serie with lineWidth parameter.
Upvotes: 3
Reputation: 19093
One option would be to add 1 second to each duplicate date. This would make them unique, but the difference wouldn't be visible to the eye.
Some points to node: 1. Sort your data first in date order. 2. Use a datetime x axis 3. Convert the dates using the javascript function Date.UTC(year,month,day,hour,minute,second) (note, months start at zero).
Upvotes: 1