"dash length list in px" option not specified in schema
See original GitHub issueSee https://github.com/plotly/plotly.py/issues/1107.
Plotly.py version 3 is not allowing a scatter.line.dash
property to be set to a list of lengths in pixels (e.g. '5px,10px,2px,2px'
). The issue is that the schema lists the property as an enumeration, and doesn’t indicate this pixel list form:
"dash": {
"valType": "string",
"values": [
"solid",
"dot",
"dash",
"longdash",
"dashdot",
"longdashdot"
],
"dflt": "solid",
"role": "style",
"editType": "style",
"description": "Sets the dash style of lines. Set to a dash type string (*solid*, *dot*, *dash*, *longdash*, *dashdot*, or *longdashdot*) or a dash length list in px (eg *5px,10px,2px,2px*)."
},
How would you recommend proceeding in plotly.py? Should dashes be a special case (which is fine on my end), or is there something that we should do in the schema?
Thanks!
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Specifying dash length list no longer works #1107 - GitHub
In plotly.py 3.x, I can no longer specify a dashed line by specifying a string of dash lengths. Before updating to version 3, ......
Read more >Error when trying to produce a Graph in Plotly Dash
I get a strange error with the app expecting a different object: dash._grouping.SchemaTypeValidationError: Schema: [<Output selected-plots.
Read more >Graph | Dash for Python Documentation | Plotly
See schema: https://plotly.com/javascript/reference config is set separately by the config property. figure is a dict with keys: data (list of dicts; optional).
Read more >XML Schema Part 2: Datatypes Second Edition - W3C
Some but not all of these are expressed in Schema for Datatype ... The ·value space· of a ·list· datatype is a set...
Read more >reStructuredText Markup Specification - Docutils - SourceForge
This document is a detailed technical specification; it is not a tutorial or a ... The body of explicit markup blocks, field lists,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks @alexcjohnson and @etpinard,
I’ll make it a special case and use @alexcjohnson 's regular expression as a starting point for our own validation. Even if we do add the regular expression to the schema, a special case is probably more user-friendly than telling a user that their string must match this regular expression 🙂
Here’s the full list of traces that have a
line.dash
property.Based on the descriptions, it looks like all of them except
scatterpolargl
,scattergl
, andscatter3d
support the custom length dashes. Does that sound right?That’s correct 👍