-
-
Notifications
You must be signed in to change notification settings - Fork 386
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
Aligning timescale bars to the start of period? #310
Comments
odd. i have not seen this type of misalignment. all temporal demos which i have seem to work properly. e.g. https://leeoniya.github.io/uPlot/demos/months.html please create a jsfiddle or provide your data and chart opts which reproduce this issue. |
that link does not work :( |
Sorry about that, let me try again https://jsfiddle.net/buyzhq76/ |
might have something to do with leap year accounting. seems to start out fine and then goes off the rails. |
ok, so there were a couple things going on here. with the second issue was a bug in the way year incrementing was done and how the first tick was getting set. it was both a starting point problem, and also a leap year problem. this has been fixed by the linked commit (though i'm not sure if it's fully bulletproof). your fiddle now works correctly when you drop |
Thanks, that's very helpful. |
I very much like this library, but can't see how to solve one thing that annoys me.
If I plot say a timeseries of 12000 daily values, on the x-axis I have a number of years labeled, with grey grid lines, but these labels and grid lines do not correspond to the start of the year, e.g. the grid line labelled 1978 is at the value for 1978-11-08, similarly if I zoom in, then I get labelled month grid lines, these sit somewhere in the middle of the month.
This makes reading the chart much trickier than it should be. Is there some option I haven't noticed to align these how I want?
The text was updated successfully, but these errors were encountered: