How to implement error bars for only particular values in type- scatter and mode- line chart

Hi Team,
I would like to have the error bars only on certain values for Plotly graph. The examples shown on the reference site are for all data points.

Please let me know the answer.

Hi @ssalve ,

Try set the error array values as "_" for data points that donโ€™t have error.

var data = [
  {
    x: [0, 1, 2],
    y: [6, 10, 2],
    error_y: {
      type: 'data',
      array: [1, "_", 3],
      visible: true
    },
    type: 'scatter'
  }
];
Plotly.newPlot('myDiv', data);

Hope this help.

1 Like