plotly.js icon indicating copy to clipboard operation
plotly.js copied to clipboard

Default bar width on date axes should be smarter

Open nicolaskruchten opened this issue 4 years ago • 1 comments

Followup from https://github.com/plotly/plotly.py/issues/3715 ... if I have a trace with a single bar in it and the x axis is datetime, then the width of that lonely bar ends up being like 1ms or something. This is never incorrect but also rarely the obviously right thing to do. A smarter behaviour would be to look at the "first non-zero date part" and make the bar that width, so:

  • 2022 -> 1 year
  • 2022-01-01 -> 1 year
  • 2022-02-01 -> 1 month
  • 2022-02-02 -> 1 day
  • 2022-02-02 10:00:00 -> 1 hour
  • 2022-02-02 10:05:00 -> 1 minute
  • 2022-02-02 10:05:12 -> 1 second

nicolaskruchten avatar May 27 '22 15:05 nicolaskruchten

Hi - we are trying to tidy up the stale issues and PRs in Plotly's public repositories so that we can focus on things that are still important to our community. Since this one has been sitting for several years, I'm going to close it; if it is still a concern, please add a comment letting us know what recent version of our software you've checked it with so that I can reopen it and add it to our backlog. Thanks for your help - @gvwilson

gvwilson avatar Jul 03 '24 17:07 gvwilson