[FEATURE]: Provide a way to enable aligning the 0-point of overlaid axes
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 18.3k
- Forks
- 2k
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 28
Description
I have a plotly chart with lines and columns with both negative and positive values. The 0 on both y axes is at a different spot. It would be nice if there were an option in layout.yaxis where one could align the 0s without having to calculate the domain.
Here is a codepen illustrating the issue: https://codepen.io/mtadams007/pen/ByNgyjJ?editors=0010
The solution proposed in https://github.com/plotly/plotly.js/issues/1845#issuecomment-312896241 does not work as in that example both axes start with 0 and have no negative numbers.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked CodePen to reproduce the different zero positions for overlaid y axes with negative and positive values. Review the earlier discussion in issue #1845 and the layout.yaxis behavior; the work is done when an explicit option aligns both axes at zero without manual domain calculations and the demonstrated case is covered.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- data-visualization
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100