-
Notifications
You must be signed in to change notification settings - Fork 11.9k
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
Time scale first tick formatting inconsistent #4523
Comments
Thanks for letting me know- I hope the other min/max PR is good enough though ;I) |
It looks like there's a couple bugs here. There's a feature where we do some smart auto-formatting of labels: #4187 There's a known bug that it's only auto-aligning the first point. It should also align a point for Feb, Mar, etc. in your example above. Also, the year shouldn't be included on the dates above unless you set it manually in which case it should apply to all labels. If you use auto labeling, then the axis should look something like "Jan 2017", "Jan 11", "Jan 21", "Feb 2017", "Feb 10", "Feb 20", "Mar 2017", "Mar 11" |
@andig I'm going to fix this bug as my next task. If you post a JS snippet to generate this chart, then I'll confirm my fix works for your use case and share a screenshot here |
@benmccann here's an example: https://jsfiddle.net/andig2/wzg3p3m9/ When I'm running this locally against current master the first tick is still off. The fiddle is not using current master but has the same problem. |
@andig is there a reason you set:
That makes the chart display pretty poorly for me. If you take those out then I find the display is much better |
Its the exact time range the user zoomed to- it should display just fine with any such selection since the zoom range is user-controllable. |
@benmccann here's a link to the current application running on flot that I'm trying to migrate to chartjs: https://demo.volkszaehler.org/?from=1500803195142&to=1500889595142&uuid%5B%5D=12345678-1234-1234-1234-123456789012%40middleware.php. You'll notice the zoom controls (and mouse selection) that gives the user abilitity to adjust zoom to any desired time period. |
Cool. Thanks for sharing! I agree we should support what the user zooms to. I'll probably address this in a few parts over the next week or two |
@andig I wanted to see what you thought about the screenshot in #4600. It fixes the alignment of month starts, which would make the tick formatting much better. In the case that we have this fix, would you prefer to be able to set a different custom formatting for the first of each month or would you still want to format all dates the same? |
@benmccann Must say I don't like it at all unless its configurable. I would just have expected "March 1" like the other ticks. The screenshot looks- to me- noisy and unscientific (but then- I'm an engineer by profession). My problem with the chart obove is that only the first tick is off (but e.g. not the start of other months in the chart). So either it should be "period start is different (but configurable)" or "all ticks equal". It looks like #4600 tries to achieve the former which is ok if it can be configured. |
Closing in favour of #4600 and will reopen if necessary. |
Under certain circumstances (figuring out) the first tick uses different time formatting from following ticks (master).
The text was updated successfully, but these errors were encountered: