plotly / plotly.js

Open-source JavaScript charting library behind Plotly and Dash
https://plotly.com/javascript/
MIT License
17.02k stars 1.86k forks source link

make date autoformatting (duplicate 2nd line omission) configurable #3108

Closed cldougl closed 4 months ago

cldougl commented 6 years ago

When using properly formatted dates in the default format the second line is automatically omitted after the first tick if it doesn’t change.

markzolotoy commented 6 years ago

Yes, very useful. It is absolutely critical for international applications.

alexcjohnson commented 6 years ago

@markzolotoy interesting, can you say more about why this becomes more important internationally? I agree that it's a useful feature, but the implication of your comment is that the labels are actually wrong, or unintelligible perhaps, with automatic duplicate pruning in other languages/calendars?

markzolotoy commented 6 years ago

When using default date formatting which for US dates it is working in that way. But try to achieve the same for any foreign date such as French or Chinese. Since our app. allows our customers flip between languages it is critical that it looks and feels exactly the same in every language.

stringfellow commented 5 years ago

Another use case for this is one I have - I'd like to show the weekday in that date format part, which is very important for my use case, but I also don't want that to be repeated on every time tick. I think the line that causes this is:

https://github.com/plotly/plotly.js/blob/30ed4a4a59789a486b70dda360d630d290811816/src/lib/dates.js#L474

Would be very grateful for some way to customise or work around this (even if a workaround is to somehow override the dayMonthYear format...?)

gvwilson commented 4 months ago

Hi - this issue has been sitting for a while, so as part of our effort to tidy up our public repositories I'm going to close it. If it's still a concern, we'd be grateful if you could open a new issue (with a short reproducible example if appropriate) so that we can add it to our stack. Cheers - @gvwilson