You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
DensityMapbox is missing hover, color-scale, and data-array attributes #413
The DensityMapbox trace exposes only a small subset of the attributes that plotly.js v3.6.0 supports for the densitymapbox trace. In particular it has no hover configuration and no color-scale controls, so a density heatmap cannot show per-point hover text or a custom/reversed colorscale + colorbar.
Current behavior
DensityMapbox currently supports only: name, visible, showlegend, legendrank, legendgroup, legendgrouptitle, line, lat, lon, z, opacity, subplot, zauto, zmin/zmax/zmid, zoom, radius.
Because there are no hover fields, the default hover readout is raw lat/lon/z — and when z is a uniform weight (a common case), the hover shows a meaningless z: 1.
Add the above as Option fields following the existing FieldSetter pattern, mirroring the field/type/serde conventions already used by ScatterMapbox and ChoroplethMap (e.g. hover_text: Option<Dim> → hovertext, color_scale: Option → colorscale, color_bar: Option → colorbar). Existing fields are unchanged, so this is purely additive.
Notes / out of scope
DensityMapbox has been deprecated. Adding this support to help users transition to the new DensityMap trace.
radius stays Option (scalar). plotly.js allows number or array (per-point radius); widening to Dim<_> is a breaking change to the existing setter and can be a follow-up.
The pre-existing zoom and line fields are not valid densitymapbox trace attributes (zoom belongs on layout.mapbox.zoom); removing them would be breaking and is left for a separate cleanup.
Activity
docs(changelog): reference issues plotly#413/plotly#414 for density t…
jqnatividad commentedon Jul 5, 2026
Closing this as I eventually decided to use DensityMap instead, which replaces the deprecated DensityMapbox (see #415)