I’ve read
https://dash.plotly.com/clientside-callbacks
and implemented this example:
app.clientside_callback(
"""
function(figure, scale) {
if(figure === undefined) {
return {'data': [], 'layout': {}};
}
const fig = Object.assign({}, figure, {
'layout': {
...figure.layout,
'yaxis': {
...figure.layout.yaxis, type: scale
}
}
});
return fig;
}
""",
Output('clientside-graph-px', 'figure'),
Input('clientside-figure-store-px', 'data'),
Input('clientside-graph-scale-px', 'value')
)
My question is how to update the figure layout showlegend value rather than the scale.