{{ message }}
Repository navigation
Add line.dash support to scattermap traces - #8135
Open
CloudCorpRecords wants to merge 2 commits into
Open
CloudCorpRecords wants to merge 2 commits into
CloudCorpRecords wants to merge 2 commits into
Conversation
Implements plotly#6791: scattermap line attributes gain the standard dash style, converted to the MapLibre line-dasharray paint property. The earlier attempt (plotly#7712) bundled this with unrelated work and never coerced the attribute (defaults.js passed noDash: true), so the feature never took effect. Dash lengths reuse Drawing.dashStyle so named styles match SVG rendering, scaled to line-width units for MapLibre. Includes jasmine defaults and convert tests, a new image mock, regenerated plot schema, and a draftlog entry. Signed-off-by: Rene Turcios <95189389+CloudCorpRecords@users.noreply.github.com>
Signed-off-by: Rene Turcios <95189389+CloudCorpRecords@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Adds
line.dashtoscattermaptraces, closing #6791.What it does: the standard dash style attribute (solid, dot, dash, longdash, dashdot, longdashdot, or a custom px list) is now available on scattermap lines and is converted to the MapLibre
line-dasharraypaint property. Dash lengths reuseDrawing.dashStyle, so named styles match SVG rendering, scaled to line-width units because MapLibre scales dasharray values by line width.Why this shape: PR #7712 bundled this with two unrelated features and was closed with a maintainer request to split it up (emilykl: "feel free to open a separate PR and continue work" on the line-styles part). That attempt also never coerced the attribute (
defaults.jspassednoDash: true), sotrace.line.dashstayed undefined and the conversion never ran. This PR adds the attribute, removes thenoDashflag, and converts it.Tests:
test/jasmine/tests/scattermap_test.js: new defaults test (dash defaults to solid, named styles coerce) and new convert test (exactline-dasharraypaint values for solid/dash/dot/longdashdot and a custom px list).test/image/mocks/map_line-dash.json(validated withnpm run test-mock); baseline will be generated by CI.npm run lint,npm run typecheck,npm run test-syntax(all pass);npm run schemaregeneratedtest/plot-schema.jsonand types.Notes:
solidsets noline-dasharray, so existing plots render identically.draftlogs/NNNN_add.mduses a placeholder number and will be renamed once this PR has a number.�f426