Strange behaviour of y axis boundaries in chart


on OH 3.4.2, I have experienced a strange, but reproducable behaviour with my charts when setting the min and max boundary of a y axis: If the min boundary has less digits than the max boundary and the first digit of the min boundary is higher than that of the max boundary, no scale is drawn on the y axis. Let me give some examples:

0 to 100 → everything ok
10 to 100 → everything ok
20 to 100 → nothing drawn
20 to 199 → nothing drawn
20 to 200 → everything ok
98 to 99 → everything ok
99 to 100 → nothing drawn
100 to 101 → everything ok

It seems to me there is a comparision if the min boundary is lower than the max boundary, but it is not done on the value, but on the textual representation of the input. Another evidence for that idea is the fact, that if I put a leading “0” in the min boundary, e.g. 099 instead of just 99, then everything will work.

This behaviour I could reproduce on just a newly created chart without any item linked to it.

Definitely seems like this is worth filing an issue; the only question is where. My gut reaction is that this is related to OH chart yaml before the eCharts call so this is probably an issue that should be filed on the OH UI repo.

This Problem seems to be unsolved in Version 4.0.4

I just came across this topic because I experienced the same problem. For my chart showing the air pressure in hPa, I want to limit the chart y-axis from 900 to 1100. But it shows as no boundaries where set at all.

Then I tried to add a leading 0 to the lower value and it worked fine. So entering 0900 instead of 900 did the trick.

To me this seems to be a bug. When using numbers, no one expects this behavior.