I need some help on how to configure the bar diagram to show X axis properly #540
Replies: 1 comment 3 replies
-
OK here is another issue. When I first load the diagram for march Then I drag the diagram slightly to the left, voila, the bars appear. You can also see that for 01 of March, there is no value. It exists when I scroll up a bit. It is almost as if the bar diagrams dont fetch statistic data with the proper range/interval. It is only when I start dragging when new queryes are executed that the correct data appear. The Y axis is also not properly scaled, since the value for 01/03 is missing. As for why I just get a vertical line, beats me. I use dynamic sensor names, and for some sensors that have a LOT of data back into 2024 it works right from the beginning. For sensors or utility meters with very little data, days, weeks, it behaves like this. I am pretty sure that I am doing something wrong in my configuration. But I can't keep guessing how the plotly graph works. I would appreciate some assistans in how to troubleshoot this further. Maybe it is the component/configuration, maybe it is the data? I have no clue. I only know that it works sometimes... with some sensors. WHen I look in the ststistics database using plain SQL the data looks fine to me. You can also see that on the top left where I calculate cost and sum. That calculation is based on raw SQL and is 100% correct. It is the digram and it's method of fetching data that is wrong somehow.... thank you |
Beta Was this translation helpful? Give feedback.
-
I am trying to make a simple bar diagram for days, months and years. No interactivity, just simple bar diagrams.
I have spent better part of the day trying to figure out how this works, but I am getting more and more confused. Look att this simple diagram:
This is by month, so I want to show on x axis 01-31 or whatever range the current month has. The data is in the statistics database.
I use autorange, since It seems like the way to go. I have set some key properties such as:
With the above, I assumed that current month is this month (february) and offset -1M means January.
autoRange should then be 01-31 for X-axis since I set
and
The results are very confusing. Here is when I just load it (with offset -1):
It stats at the third of january
And here is when I drag the diagram slightly to the left
Behold, there are the missing bars for 01 and 02!!!
Why doesn't the x axis start from 01 then? How can I modify the yaml below to make the x-axis show bars and ticks prperly for year (2025, 2024, 2023), month (Jan-Dec) and Day (01-31) ?
What is it that I have messed up here?
Beta Was this translation helpful? Give feedback.
All reactions