Skip to content

Commit 292acf8

Browse files
committed
fix issue with symbols not rendering in legend for scattermap traces
1 parent 25f6b02 commit 292acf8

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/components/drawing/index.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1866,7 +1866,10 @@ function getMarkerAngle(d, trace) {
18661866

18671867
if (angle === undefined) {
18681868
angle = trace.marker.angle;
1869-
if (!angle || Lib.isArrayOrTypedArray(angle)) {
1869+
// For scattermap traces, `trace.marker.angle` defaults to 'auto',
1870+
// which is meaningful for the MapLibre code but not for plotly.js itself.
1871+
// Therefore we need to coerce any non-numeric values to 0 (no rotation).
1872+
if (!isNumeric(angle) || Lib.isArrayOrTypedArray(angle)) {
18701873
angle = 0;
18711874
}
18721875
}

0 commit comments

Comments
 (0)