Hi @Peilin I don’t think there is a way to do so in plotly, if you are open to use dash, there might be an solution.
dash
Maybe helpful: