-
Notifications
You must be signed in to change notification settings - Fork 88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Apexchart card does not align correctly to day/hour boundaries #811
Comments
I made a different test:
but I had to use a "offset: +30m", while the docs clearly write that
|
I somewhat corrected it with a time delta, like:
|
@Harry-1976 what's the difference compared to using an offset as I did? Your solution seems to make the numbering start at 0:00, the offset at 1:00, but the final looks is better in the latter case, in yours the white space on the left is larger and the one on the right after the last column seems to small. |
Anyway the use of group_by solved my issue, but the initial issue remains: "span: 1d" shows more than one day of data. |
Hi @dewi-ny-je , you are right that the graph in your case looks better than mine and it bothers me. I have created 2 cards. The left card is with my solution, the right card with yours. In my card the color of the price in the header matches the color in the graph at the 'now' time line and it is showing the correct price per hour. Anyway, there's two solutions now that really aren't solutions. There's one issue or another. |
Also, see #1688 |
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 10 days. |
Checklist
Version of the card
"installed_version: v2.1.2"
Desktop (please complete the following information):
Smartphone (please complete the following information):
Describe the bug
I use "column" visualisation.
Even if I use
the columns are not aligned to day boundaries.
This is the configuration I used:
The input data
The first column is cut and “Now”, which should be in the beginning of a column, since right now it’s 14:16, is instead placed near the end of the column.
There is maybe a half hour offset, probably because the columns are centered to the hour marks so they appear from hour-30m to hour+30m, even if the values refer to the whole hour span, from hour to hour+59m.
If I use
return [new Date(record.time).getTime() + 30*60*1000, record.price - 0.1515];
The ticks on the X axis are correct and the columns are centered to the half hour mark, so the numbers are correct too.
The “Now” mark is also correct.
However I get 25 columns!!!
Then I tried
and I got apparently what I needed:
however it's not reliable, sometimes I still get half of the 25th columns, and the graph for the following day, identical settings except for
offset: +1d+41m
starts with half column.
Something seems to be wrong in the card.
The text was updated successfully, but these errors were encountered: