Updating the X axis labels

Hi, I created a simple code example of my issue: http://jsbin.com/xogapupoca/edit?html,js,console,output

It creates a couple of series and then tries to update the following things:

  • The chart title (working)
  • The marker color (not working)
  • The x axis labels (not working)

Am I fundamentally misunderstanding the update function? I’m basically just replacing the original data array with a new one.

Thanks in advance for any suggestions.

Luis

Here’s a working version:

In brief, Plotly.update does not expect new traces and new layout object, it expects key-value update pairs. See https://plot.ly/javascript/plotlyjs-function-reference/#plotlyrestyle for more info.

1 Like

Awesome, it makes sense now :sweat_smile:, thanks for the quick reply :raised_hands:

1 Like