plotly.js
plotly.js copied to clipboard
Multi-axis Shapes
Description:
Extends xref and yref to accept arrays, allowing shapes to span multiple subplots with each vertex anchored to a different axis. See #7151 for more information.
Example:
shapes: [{
type: 'rect',
x0: 0,
x1: 1,
y0: 0,
y1: 1,
xref: ['x', 'x2'], // x0 uses 'x', x1 uses 'x2'
yref: ['y', 'y2'] // y0 uses 'y', y1 uses 'y2'
}]
Progress:
- [x] Step 1: Attributes & validation
- Extend
xrefandyrefto allow array values - Add helper function to check number of defining coordinates of a shape
- Update value validation to work with array values
- Extend
- [ ] Step 2: Refactor coordinate conversion
- [ ] Step 3: Update shape rendering
- [ ] Step 4: Addressing editable shapes
- [ ] Step 5: Tests + documentation