Highcharts boost to 0 and then rise again

I have a highchart that I generate data dynamically based on a date range entered by the user. The data in the table are power readings. Readings are done every hour. If there is no power, nothing is reported and stored in the database. So, I have a chart ( jsfiddle sample / dPqg7 / ) that I use to display data. However, the graph links the last reading from one day to the first reading of the second day. Is there a way to get the series to zero before it starts returning the next day?

+4
source share
1 answer

Yes, you can. If you want it to be zero, the last read on the first day should be zero, and the first read on the second day should be zero . Or, since you are dynamically creating data, you can track the clock, and if no data is available, it is automatically set to null or zero .

To me personally, I would like to display data for each data point in the user date range. Therefore, I would display zeros for every hour when there is no data.

I noticed that your tooltip shows m / s. I assume that you used a different chart and missed its change in kwh.

+4
source

All Articles