Add stroke_dash_array option to TimeSliderChoropleth - #2273
Open
ChrisJr404 wants to merge 1 commit into
Open
Conversation
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.
Follow-up to #1615. That issue asked to make the stroke around
TimeSliderChoroplethfeatures configurable, and #1838 addedstroke_color,stroke_widthandstroke_opacity. But the dash pattern is still hard-coded in the template:So the white dashed line the original reporter wanted to get rid of can be recolored or hidden, but you still can't make it solid. This adds a
stroke_dash_arrayargument that feeds straight into the SVGstroke-dasharray:The default is
"5,5", which renders exactly like before, so existing maps are unchanged. I also documented the three earlier stroke options in the docstring while I was there, since they weren't listed yet.Testing
Two new tests in
tests/plugins/test_time_slider_choropleth.py: one checks the default still emitsstroke-dasharray', '5,5', the other thatstroke_dash_array="0"emits'0'and no longer the dashed default.pytest tests/plugins/test_time_slider_choropleth.pyis 3 passed; the only failure istest_timedynamic_geo_json, which needsgeodatasets/geopandasand fails the same way on an unmodified checkout.ruff,blackandcodespellare clean on both files.