strokeDashArray affects markers
Current State
Certain settings on strokeDasharray property may break the markers. Here for instance instead of an arrow on the line we have a tick:
Repro
Plot.plot({
marks: [
Plot.lineY([[0,5],[5,2],[10,0]], {
x: (d) => d[0],
y : (d) => d[1],
strokeDasharray: "1,10",
strokeWidth:3,
markerMid: "arrow"
})
]
})
Expected State
strokeDasharray should not affect markers, or there should be a separate property to control it:
Yes, this looks like a bug. The marker element is inheriting the stroke-dasharray because it’s within the g of the line mark. We could either move it up so it doesn’t inherit, or set the stroke-dasharray attribute on the marker explicitly to none. It seems reasonable that the marker shouldn’t inherit dashed strokes.
Thanks for confirmation and pointing me into the right direction. Seems like an easy fix for me to figure it out. I'll make a PR if I fix it.