Skip to content

Inconsistency when setting tickvals and omitting ticktext in date axes #738

Closed

Description

@stakemura

Activity

  1. etpinard commented on Jul 12, 2016

    @etpinard
    Contributor

    That's probably because your tickvals aren't valid date timestamps.

    How did you get those values?

  2. stakemura commented on Jul 12, 2016

    @stakemura
    Author

    In real use case, I used programmaticaly-generated date timestamps.
    However, all cases seemed to be failed.
    OK. the following new sample use apparently valid timestamps.
    How about https://jsfiddle.net/0cjprqgy/11/ ?

  3. etpinard commented on Jul 13, 2016

    @etpinard
    Contributor

    Looks like those weird tick labels are caused by you not providing a ticktext setting to accompany tickvals. Setting a proper ticktext makes your problem go away http://codepen.io/etpinard/pen/YWEdJX .

    But, those weird labels do showcase an inconsistency between linear and date axis types. See http://codepen.io/etpinard/pen/rLYoqK here omitting to provide ticktext falls back to stringnified tickvals values - making this issue a very low priority bug.

    Maybe a better question to ask ourselves: should we allow tickmode: 'array' when tickvals isn't provided? I'm changing the issue title to reflect this. Thanks.

  4. changed the title [-]`tickvals` has display bug on date axis[/-] [+]Inconsistency when setting `tickvals` and omitting `ticktext` in date axes[/+] on Jul 13, 2016
  5. added
    bug
    community
    on Jul 13, 2016
  6. stakemura commented on Jul 13, 2016

    @stakemura
    Author

    Thank you for your consideration.
    I tried tickvals with ticktext actually but I found the different problem.
    Like http://codepen.io/etpinard/pen/YWEdJX , hover text won't be able to show date.
    I guess hover text on date axis show date and time fundamentally.
    What makes this difference?

  7. etpinard commented on Jul 13, 2016

    @etpinard
    Contributor

    hover text won't be able to show date.

    You mean it only shows the hour? Interesting. Thanks for pointing this out. This is probably related to the inconsistency mentioned in #738 (comment)

  8. stakemura commented on Jul 14, 2016

    @stakemura
    Author

    Without tickvals date axis shows date and time apparently.
    Please check https://jsfiddle.net/0cjprqgy/12/ .

  9. etpinard commented on Jul 14, 2016

    @etpinard
    Contributor

    Without tickvals date axis shows date and time apparently

    Yeah I noticed that too. This should be resolved in the same patch as for #738 (comment)

    Thanks.

  10. added this to the Better dates milestone on Sep 7, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugcommunity

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions