I have a chart with a ‘filledtoy’ line, and also a line shape that is draggable.
I want to update the filledarea till the x value of the line shape after it’s been dragged.
I attached and event to ‘plotly_afterplot’ to adjust the data belonging to the filled area
I almost have it, but, the problem I’m having is that the update only occurs after I dragged the vertical line twice
You’re not using relayout as intended. Relayout expects an update object that modifies the layout, calling Plotly.relayout(graphDiv) won’t do anything by itself. As you’re mutating some internal fields (it’s probably always a bad idea to play around with gd._fullData by the way), the graph eventually updates, but you shouldn’t count on that.