Dash property not working en error bar

I have something similar to this… I would like for the error bars to be dotted or dashed instead of full line but this doesn’t seem to be taking the “dash” property into account, all the rest are accounted for. The property is also correctly read for the main data line, but not for the error bar. Not sure if this just doesn’t work or if I’m setting some parameter in the wrong place or something.

Thanks so much!

In case it helps, here is a working fiddle: Error Bars Testing Fiddle

var data = [{
  x: [1, 2, 3, 4],
  y: [2, 1, 3, 4],
  error_y: {
    type: 'data',
    symmetric: false,
    array: [0.5, 0.2, 0.9, 0.1],
    arrayminus: [0.2, 0.4, 1, 0.2],
    thickness: 5,
    width: 6,
    opacity: 1,
    color: "grey",
    dash: "dash"
  type: "scatter",
  line: {
    color: "black",
    width: 4,
    dash: 'dash'

Plotly.newPlot('myDiv', data);

error_y has no opacity or dash property

1 Like

Ok bro, here is a hack that can help you for the moment, you are going to need to modify the Plotly.js file so I hope you have it downloaded and you are not working from a cdn, in the file look for the value 92036, there are only two in the entire file, move to the second and change the style(traces) function to the following (Comment the lines to add)

And here is a sample of the result

At the moment the error lines have the same dash as the main graph (trace.line.dash), I couldn’t get it to read the dash parameter inside error_y (yObj.dash), the style function receives the traces and each trace has the properties stored in _fullData, somehow in the code some type of validation is done that eliminates parameters that are not typical of Plotly, and although the data can be read from layer.data it is not found in layer._fullData

1 Like

Hey thanks for the workaround! I’ll give it a try!