question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

"dash length list in px" option not specified in schema

See original GitHub issue

See 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:open
  • Created 5 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
jonmmeasecommented, Aug 15, 2018

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.

screen shot 2018-08-15 at 6 21 37 am

Based on the descriptions, it looks like all of them except scatterpolargl, scattergl, and scatter3d support the custom length dashes. Does that sound right?

0reactions
etpinardcommented, Aug 15, 2018

all of them except scatterpolargl, scattergl, and scatter3d support the custom length dashes. Does that sound right?

That’s correct 👍

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found