-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Custom values for griddash
, e.g. '10px' don't work (plotly.js 2.12.0)
#3710
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
It looks like our Python-side validation code for 'dash' strings is too restrictive. |
I suspect this bug exists for every "values": [
"solid",
"dot",
"dash",
"longdash",
"dashdot",
"longdashdot"
] |
Here is the current plotly.py validator: plotly.py/packages/python/plotly/_plotly_utils/basevalidators.py Lines 2245 to 2324 in d5b341c
|
so what's different between |
|
yes that works also |
What happens if we do not validate by simply dropping |
@alexcjohnson your thoughts? |
Well, the whole purpose of |
The problem isn't the Here is the code for the |
So where else do we need to use the |
Can't we instead say every attribute that ends with |
It's a bit hard to crawl the whole thing like this I think, which is why we do this enumeration. |
Let's fix this in the next patch release. I'm almost done QA'ing 5.8.0 already. |
Good idea. |
FWIW It's certainly nice the way |
I'll see what I can do. @jonmmease originally added this enumeration presumably because he felt another approach might be too brittle in a different direction. string and "has values" seems overly broad and likely to break later, no? Maybe string and "has |
I like that - hard to think what other case we'd want arbitrary strings plus enumerated values in the future, but if there is one it most likely wouldn't include dash and dot :) |
OK so I went with the "ends in |
Custom values for
griddash
, e.g. '10px' don't work (plotly.js 2.12.0)Example:
Gives the following error
@archmoj, should it work like this? That throws an error
fig.update_xaxes(showgrid=True, gridwidth=1, gridcolor='LightPink', griddash='10px')
Originally posted by @LiamConnors in #3693 (comment)
The text was updated successfully, but these errors were encountered: