Skip to content

Specifying dash length list no longer works #1107

Closed
@aplowman

Description

@aplowman

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugsomething broken

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions