Skip to content
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

Specifying dash length list no longer works #1107

Closed
aplowman opened this issue Aug 13, 2018 · 3 comments
Closed

Specifying dash length list no longer works #1107

aplowman opened this issue Aug 13, 2018 · 3 comments
Labels
bug something broken
Milestone

Comments

@aplowman
Copy link

aplowman commented Aug 13, 2018

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, I could do this.

From the docs for scatter -> line -> dash:

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").

The latter option no longer appears to be valid, yielding a ValueError. For example, the following does not work (tested in a Jupyter notebook):

import plotly.graph_objs as go

data = [
    {
        'y': [1,2,3],
        'line': {
            'dash': '5px,10px,2px,2px',
        }
    }
]
go.FigureWidget(data)
@jonmmease
Copy link
Contributor

Hi @aplowman , thanks for the report!

I just opened an associated issue on the Plotly.js project to work out how we should handle this case. Check it out if you're interested in what went wronge here: plotly/plotly.js#2903

@jonmmease jonmmease added the bug something broken label Aug 14, 2018
@jonmmease
Copy link
Contributor

Ok, looks like we'll handle this by introducing a custom LineDash validator class.

@jonmmease jonmmease added this to the v3.2.0 milestone Aug 15, 2018
jonmmease added a commit that referenced this issue Aug 29, 2018
@jonmmease
Copy link
Contributor

Fixed in #1136

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something broken
Projects
None yet
Development

No branches or pull requests

2 participants