Description
When shape.pattern is provided as an array to a bar trace, the first bar's pattern (and color!) are incorrectly applied to both bars in the hovermode: 'x unified' hover tooltip.
Expected: Swatch in hover tooltip should match color and pattern of bar which is being hovered over.
Actual: Swatch in hover tooltip matches color and pattern of first bar in trace, even when hovering over the second bar.
When shape.pattern is not provided, each hover tooltip correctly shows the color of the bar that's being hovered over.
Screenshots/Video
Steps to reproduce
Codepen: https://codepen.io/emilykl-code/pen/azJvXPy
Code:
var fig = {
"data": [
{
"marker": {
"color": ["red", "purple"],
"pattern": {"shape": ["/", ""]}
},
"textposition": "outside",
"x": ["A", "B"],
"y": [1, 2],
"type": "bar"
}
],
"layout": {
"hovermode": "x unified",
"title": {
"text": "Hover over 'B' to see wrong color and pattern"
}}
};
Plotly.newPlot("div1", fig.data, fig.layout);
Notes
First reported in plotly.py by plotly/plotly.py#4882
Description
When
shape.patternis provided as an array to a bar trace, the first bar's pattern (and color!) are incorrectly applied to both bars in thehovermode: 'x unified'hover tooltip.Expected: Swatch in hover tooltip should match color and pattern of bar which is being hovered over.
Actual: Swatch in hover tooltip matches color and pattern of first bar in trace, even when hovering over the second bar.
When
shape.patternis not provided, each hover tooltip correctly shows the color of the bar that's being hovered over.Screenshots/Video
Steps to reproduce
Codepen: https://codepen.io/emilykl-code/pen/azJvXPy
Code:
Notes
First reported in plotly.py by plotly/plotly.py#4882