Hi,
Why am I getting the following errors when I execute the line of code as shown below:
Errors:
plotly.exceptions.PlotlyDictKeyError: âdashâ is not allowed in âscatterâ
Path To Error: [âdashâ]
Valid attributes for âscatterâ at path [] under parents []: âŚ
Line of code:
trace1 = go.Scatter(x=MFTdf[âMFTâ], y=MFTdf[âMFT Planned Completeâ], mode = âlinesâ, name = âMFT Plannedâ, line = dict(color = ârgb(255, 127, 14)â), dash = âdotâ)
In the error paragraph, it mentions that âdashâ is not a valid attribute, but how can that be? I extracted this from the Plotly-API reference:
dash (string)
_default: âsolidâ _
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â).
and here is an example from the Plotly website:
trace5 = go.Scatter(
x = month,
y = low_2000,
name = âLow 2000â,
line = dict(
color = (ârgb(22, 96, 167)â),
width = 4,
dash = âdotâ)