Skip to content
Merged
Show file tree
Hide file tree
Changes from 12 commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
de99bdc
Add support for dashed marker lines in scatter plots
chrimaho Dec 12, 2025
8c1fdf2
Add changelog entry for dashed marker line support
chrimaho Dec 12, 2025
d838891
Add dash attribute support to marker lines across scatter trace types
chrimaho Dec 12, 2025
0df71bb
Hide marker line for blank points in scatter plots
chrimaho Dec 13, 2025
26eecd9
Add dash style property to marker line schemas
chrimaho Dec 13, 2025
6ce3af4
Fix failing CI for `text_on_shapes_basic` pixel comparison
chrimaho Dec 13, 2025
753c6ed
Simplify stroke styling and remove unused dash line logic
chrimaho Dec 13, 2025
6de355d
update plot-schema diff
chrimaho Dec 14, 2025
8573067
Revert `plot-schema` to version from `master` branch
chrimaho Dec 20, 2025
6fa75bc
Remove `arrayOk` attribute from the `marker.line` attribute of the `s…
chrimaho Dec 20, 2025
ac01dc3
Remove `marker.line.dash` changes from the `scatter3d`, `scattergl`, …
chrimaho Dec 20, 2025
f348454
Implement logic to actually draw the dashed lines
chrimaho Dec 20, 2025
f733505
Fix missing end of file newline
chrimaho Jan 18, 2026
3dd16f7
Add `arrayOk` attribute to `marker.line.dash` for scatter plots.
chrimaho Jan 18, 2026
7eb1943
Add tests and mock data for scatter marker line dash support
chrimaho Jan 18, 2026
90ab105
Update `plot-schema` diff
chrimaho Jan 18, 2026
e8a702d
Rename test file
camdecoster Jan 29, 2026
cddc465
Update mock layout
camdecoster Jan 29, 2026
67458e7
Linting/formatting
camdecoster Jan 30, 2026
65a0d87
Don't coerce marker.line.dash for some traces
camdecoster Jan 30, 2026
5fbbac5
Enable dash styles for open markers
camdecoster Jan 30, 2026
05e851f
Update mock styles
camdecoster Jan 30, 2026
869367e
Fix failing test
camdecoster Jan 30, 2026
9361e7e
Add basline image for mock
camdecoster Jan 30, 2026
6a3273e
Merge remote-tracking branch 'origin/master' into feature-marker-line…
camdecoster Jan 30, 2026
d4d4972
Update baseline image per PR changes
camdecoster Jan 30, 2026
ebdb604
Update draftlog
camdecoster Jan 30, 2026
cbd4dd2
Linting/formatting
camdecoster Feb 2, 2026
f7f9714
Revert "Update baseline image per PR changes"
camdecoster Feb 2, 2026
2edd723
Don't use dash in legend markers for shape traces
camdecoster Feb 2, 2026
f698f6b
Add test to check for shape legend marker dashes
camdecoster Feb 2, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions draftlogs/7673_add.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Add support for dashed marker lines in scatter plots [[#7673](https://github.com/plotly/plotly.js/pull/7673)]
3 changes: 3 additions & 0 deletions src/components/drawing/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -975,6 +975,9 @@ drawing.singlePointStyle = function (d, sel, trace, fns, gd, pt) {
} else {
sel.style('stroke-width', (d.isBlank ? 0 : lineWidth) + 'px');

const lineDash = d.mld || (markerLine || {}).dash;
if(lineDash) drawing.dashLine(sel, lineDash, lineWidth);

var markerGradient = marker.gradient;

var gradientType = d.mgt;
Expand Down
1 change: 1 addition & 0 deletions src/components/legend/style.js
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ module.exports = function style(s, gd, legend) {
dEdit.mo = boundVal('marker.opacity', Lib.mean, [0.2, 1]);
dEdit.mlc = boundVal('marker.line.color', pickFirst);
dEdit.mlw = boundVal('marker.line.width', Lib.mean, [0, 5], CST_MARKER_LINE_WIDTH);
dEdit.mld = boundVal('marker.line.dash', pickFirst);
tEdit.marker = {
sizeref: 1,
sizemin: 1,
Expand Down
1 change: 1 addition & 0 deletions src/traces/scatter/arrays_to_calcdata.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ module.exports = function arraysToCalcdata(cd, trace) {
if(marker.line) {
Lib.mergeArray(markerLine.color, cd, 'mlc');
Lib.mergeArrayCastPositive(markerLine.width, cd, 'mlw');
Lib.mergeArray(markerLine.dash, cd, 'mld');
}

var markerGradient = marker.gradient;
Expand Down
3 changes: 3 additions & 0 deletions src/traces/scatter/attributes.js
Original file line number Diff line number Diff line change
Expand Up @@ -555,6 +555,9 @@ module.exports = {
anim: true,
description: 'Sets the width (in px) of the lines bounding the marker points.'
},
dash: extendFlat({}, dash, {
editType: 'style'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This property already exists on the dash object, so it isn't needed here.

Suggested change
editType: 'style'

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in 6fa75bc

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You removed the wrong line. arrayOk: true is still needed. editType: 'style' should be removed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Corrected in 3dd16f7

}),
editType: 'calc'
},
colorScaleAttrs('marker.line', { anim: true })
Expand Down
1 change: 1 addition & 0 deletions src/traces/scatter/marker_defaults.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ module.exports = function markerDefaults(traceIn, traceOut, defaultColor, layout
}

coerce('marker.line.width', isBubble ? 1 : 0);
coerce('marker.line.dash');
}

if(isBubble) {
Expand Down
2 changes: 1 addition & 1 deletion src/traces/scatter3d/attributes.js
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove the changes for scatter3d. A dashed line isn't supported at the moment since it doesn't use SVG.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in ac01dc3

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like the ending new line was deleted. Could you add it back please?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in f733505

Original file line number Diff line number Diff line change
Expand Up @@ -178,4 +178,4 @@ var attrs = (module.exports = overrideAll(
'nested'
));

attrs.x.editType = attrs.y.editType = attrs.z.editType = 'calc+clearAxisTypes';
attrs.x.editType = attrs.y.editType = attrs.z.editType = 'calc+clearAxisTypes';
1 change: 1 addition & 0 deletions src/traces/scattercarpet/attributes.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ module.exports = {
line: extendFlat(
{
width: scatterMarkerLineAttrs.width,
dash: scatterMarkerLineAttrs.dash,
editType: 'calc'
},
colorScaleAttrs('marker.line')
Expand Down
3 changes: 2 additions & 1 deletion src/traces/scattergeo/attributes.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,8 @@ module.exports = overrideAll(
colorbar: scatterMarkerAttrs.colorbar,
line: extendFlat(
{
width: scatterMarkerLineAttrs.width
width: scatterMarkerLineAttrs.width,
dash: scatterMarkerLineAttrs.dash
},
colorAttributes('marker.line')
),
Expand Down
2 changes: 1 addition & 1 deletion src/traces/scattergl/attributes.js
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove the changes for scattergl. A dashed line isn't supported at the moment since it doesn't use SVG.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in ac01dc3

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like the ending new line was deleted. Could you add it back please?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in f733505

Original file line number Diff line number Diff line change
Expand Up @@ -111,4 +111,4 @@ attrs.x.editType = attrs.y.editType = attrs.x0.editType = attrs.y0.editType = 'c
attrs.hovertemplate = scatterAttrs.hovertemplate;
attrs.hovertemplatefallback = scatterAttrs.hovertemplatefallback;
attrs.texttemplate = scatterAttrs.texttemplate;
attrs.texttemplatefallback = scatterAttrs.texttemplatefallback;
attrs.texttemplatefallback = scatterAttrs.texttemplatefallback;
1 change: 1 addition & 0 deletions src/traces/scatterternary/attributes.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ module.exports = {
line: extendFlat(
{
width: scatterMarkerLineAttrs.width,
dash: scatterMarkerLineAttrs.dash,
editType: 'calc'
},
colorScaleAttrs('marker.line')
Expand Down
2 changes: 1 addition & 1 deletion src/traces/splom/attributes.js
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove the changes for splom. A dashed line isn't supported at the moment since it doesn't use SVG.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in ac01dc3

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like the ending new line was deleted. Could you add it back please?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in f733505

Original file line number Diff line number Diff line change
Expand Up @@ -183,4 +183,4 @@ module.exports = {
},

opacity: scatterGlAttrs.opacity
};
};