Skip to content
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

Closed
andig opened this issue Jul 18, 2017 · 12 comments
Closed

Time scale first tick formatting inconsistent #4523

andig opened this issue Jul 18, 2017 · 12 comments

Comments

@andig
Copy link
Contributor

andig commented Jul 18, 2017

Under certain circumstances (figuring out) the first tick uses different time formatting from following ticks (master).

screen shot 2017-07-18 at 09 33 52

@andig andig changed the title Timescale first tick formatting inconsistent Time scale first tick formatting inconsistent Jul 18, 2017
@simonbrunel
Copy link
Member

@andig there is some time scale refactor in #4507, I don't think it fixes that issue but if you are digging all these min/max bugs, you should wait #4507 to be merged to avoid conflicts :)

@andig
Copy link
Contributor Author

andig commented Jul 18, 2017

Thanks for letting me know- I hope the other min/max PR is good enough though ;I)

@benmccann
Copy link
Contributor

benmccann commented Jul 20, 2017

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"

@benmccann
Copy link
Contributor

@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

@andig
Copy link
Contributor Author

andig commented Jul 23, 2017

@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.

@benmccann
Copy link
Contributor

@andig is there a reason you set:

      "min": 1498860000000,
      "max": 1500805376773

That makes the chart display pretty poorly for me. If you take those out then I find the display is much better

@andig
Copy link
Contributor Author

andig commented Jul 23, 2017

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.

@andig
Copy link
Contributor Author

andig commented Jul 24, 2017

@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.

@benmccann
Copy link
Contributor

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

@benmccann
Copy link
Contributor

@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?

@andig
Copy link
Contributor Author

andig commented Aug 4, 2017

@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.

@andig
Copy link
Contributor Author

andig commented Aug 11, 2017

Closing in favour of #4600 and will reopen if necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants