plotly / plotly.js

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

Inconsistent `gap` attributes causes misalignment #7133

Open alexcjohnson opened 2 months ago

alexcjohnson commented 2 months ago

If you provide both bargap and scattergap but they're different, traces in the same alignment and offset group do not properly align. One way or another, ensuring these traces align is more important than honoring both gaps. Here, the orange and green scatter points should be centered on the bars of the same color, but they are not:

Screenshot 2024-08-27 at 10 41 13

https://codepen.io/alexcjohnson/pen/yLdEZvo?editors=0010

This is a little tricky though: