ioBroker/ioBroker.echarts

bar chart: values are shifted

gitisgreat2023 opened this issue · 5 comments

I have a bar char with three sources of data. Two of them are displayed together, the third is displayed at the previous day.

Well, technically the two are displayed two days in the future, and the third is one day into the future . Tat's a separate bug, bar chart is off by two days. For example the data of yesterday (29 November) is displayed as for Friday 1. of December for two sources, for the third it is displayed as for today (30 November)

All three sources have timestamps of 23:59 ish, all before 00:00. Nevertheless they seem to be treated differently.

I described the same problem here (in german though):
#472

I hope it gets fixed soon :)

Some hints:

  • I assume that the month starts with 0 instead of 1. This is probably the shift of one month.
  • It looks like that the calculation is based on 30 days per month. But months have days between 28 and 31.
  • This concerns not only months, also days that are shifted by 1 into the future (Probably also hours).

I believe that the general problem is that everything starts from 0 instead of 1 and the calculation of the months is always with 30 days.

I looked at the difference between the 3 sources. Two of them start at the same day, the third a few days later.
That might be the reason they are treated different (it shouldn't matter actually of course).

Another weird thing: the bug is present when I use the 2 or 3 month time axis zoom. With 6 months the 3 values are grouped correctly. Still a day in the future, but at least not shifted.

Same bug here. Bar charts are wrongly shifted by +1 days into the future on an x-axis that is split by days.
To be clear: This has nothing to do with the timing of data during the days. It happens with data that is updated every few minutes over the day at any time.

While the new v1.71 "offset" feature provides a workaround to the bar eChart graphics, the offset does not fix the data displayed while mouse over hovering (then it simply contradicts the chart display).