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

Please support range breaks #266

Open
bionicles opened this issue Dec 30, 2024 · 1 comment
Open

Please support range breaks #266

bionicles opened this issue Dec 30, 2024 · 1 comment

Comments

@bionicles
Copy link

Hi, thank you for maintaining this crate!

I'm working on some financial charts and curious if it would be possible to support range breaks to hide weekends for data which only happens during business days?

Benefit: time series data could look better with skipping weekends / "routine discontinuities" where there's no data

In the Python API, this is in fig.update_layout as the xaxis_rangebreaks argument.

I checked the book, the Axis, and the Layout, didn't see any rangebreaks

It would be ideal if a solution could be flexible enough to support days of the week (weekends) as well as hours of days (e.g. when markets are closed overnight in hourly financial data)

Here is the API reference for the python version of this feature:
https://plotly.com/python/reference/layout/xaxis/#layout-xaxis-rangebreaks

And here is a guide section:
https://plotly.com/python/time-series/#hiding-weekends-and-holidays

Happy New Year and I look forward to use this more and help out. I really appreciate the speed of the library in cranking plots!

@andrei-ng
Copy link
Collaborator

Hi @bionicles,

You are correct, rangebreaks support is not implemented yet. Should be straightforward to add, by looking into how rangeselector has been implemented.

Currently I am trying to fix & close some of the older issues, so don't know when I will come round to this.

Feel free to submit a PR.

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

No branches or pull requests

2 participants