Skip to content
Bug reportSep 7, 2026· 0:27· 16 views

plotly.js v4.0.0: Plotly.restyle(marker.colorbar.thicknessmode='pixels') sets thickness to ~16 000 px, collapsing the chart

0:27 total

Comments · 0

Be the first to comment.

Bug report— by SceneRecap AI

highColorbar attribute coercion / restyle handler (marker.colorbar.thicknessmode)
os: macOSdpr: 1browser: Chromium 151.0.7922.34viewport: 1280x720

Repro steps

  1. 1.Open the Plotly chart containing a scatter plot with a default colorbar
  2. 2.Click the 'Apply Plotly.restyle — set marker.colorbar.thicknessmode = 'pixels'' button

Expected

The colorbar thickness mode updates to 'pixels' with a standard pixel width (~20px), keeping the scatter plot area properly sized.

Actual

The colorbar thickness expands to 27,600px, taking over nearly the entire chart container and collapsing the scatter plot grid to the far left.

Evidence

visualScatter plot displays with normal colorbar width (~20px) on the right side of the chart before restyling
visualImmediately after restyling, the colorbar expands across the plot area to 27,600px width and the scatter plot collapses to the left margin
Issue markdown (copy-paste ready)
### Description
Calling `Plotly.restyle` to set `marker.colorbar.thicknessmode = 'pixels'` causes the colorbar thickness to expand excessively (to 27,600px), collapsing the chart layout.

### Steps to Reproduce
1. Render a scatter plot with a default colorbar.
2. Execute `Plotly.restyle(gd, {'marker.colorbar.thicknessmode': 'pixels'})` (or click 'Apply Plotly.restyle').

### Expected Behavior
The colorbar should switch to pixel mode while retaining its intended width (~20px) without distorting the main plot area.

### Actual Behavior
The colorbar thickness expands to 27,600px, consuming the entire container width and squeezing the scatter plot to the left axis.

*Recorded with SceneRecap.*

Your recordings could explain themselves too.

Free plan · silent recordings welcome · bug reports included.

Try SceneRecap free →
plotly.js v4.0.0: Plotly.restyle(marker.colorbar.thicknessmode='pixels') sets thickness to ~16 000 px, collapsing the chart · SceneRecap