How to dynamically modify query options from a panel plugin


I am working with the Plotly Panel plugin and I’m generating a heat map based on hundreds of series. I’d like to “continuously” (at least once a second) update the plot. However, it takes a relatively long time to download the data. What I would like to do is download a lot of data (say now-3h) “the first time”, cache it, and then modify the query options to only download the last minute or so of data which I can then incorporate into the structure that I pass to Plotly.

The Plotly Panel plugin runs a little snippet of javascript every time data is received. I’m kind of hoping that I can update the query options in there. Otherwise, I suppose I could modify the Plotly Panel plugin.

Can anyone give me pointers to how I would go about updating the query options for a panel from within a panel plugin?


so what you do is working on anoter database, where you do the cache things. than the work is on that database in in blotpy you only select the new cache database.

Thanks for the reply though I’m not sure that I understand your suggestion.

I’ve built a local version of the Plotly Panel plugin and I’ve modified it to pass “this” (the Panel object) so I have access to panel.props.timeRange.

I’m kind of hoping that I can modify that timeRange and the call something else to reread the variable, but I don’t know what I should call or even if this is the right way to update the the time range for a panel.