Boss Man
Boss Man

Reputation: 769

Make gap size proportional to gap in series data

I'm using Highcharts to draw time series data. Instead of explaining what I'm trying to do, please visit this JsFiddle. My problem is the gap between the missing data. If you observe the graph, there are two gaps.
1) For the first gap, data is missing for ~15 mins. From 1:11 AM to 1:30 AM.
2) For second gap data is missing for ~5 hrs. From 2:12 AM - 7:36 AM.

If you observe the gap width stays the same for 15 mins and 5 hrs missing data. For someone just glancing at the graph, this is misleading.
Is there a way make gap width proportional to missing data? One way is to all nulls between. But maybe there is an out-of-the-box solution?
Thanks.

Upvotes: 1

Views: 72

Answers (1)

Barbara Laird
Barbara Laird

Reputation: 12717

If you make the xAxis not ordinal, it will space the time evenly over the axis. https://api.highcharts.com/highstock/xAxis.ordinal

  xAxis: {
    ordinal:false
  },

https://jsfiddle.net/aqcd8cqw/3/

Upvotes: 3

Related Questions