You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It uses the setSeries hook to restack things when a series has been shown or hidden:
// restack on toggleopts.hooks={setSeries: [(u,i)=>{letstacked=stack(data,i=>!u.series[i].show);u.delBand(null);stacked.bands.forEach(b=>u.addBand(b));u.setData(stacked.data);}],};
However, the setSeries hook also fires when just hovering and focusing a series, so by just hovering over a graph with many series, a lot of extra computations are taking place and things get slow.
Is there a nice way to distinguish between toggling a series vs. just hover-focusing, or would this require code changes to uPlot?
I guess I could do it right now by manually remembering & comparing the show states of all series between hook firings, but it would be nice to be able to just tell them apart.
The text was updated successfully, but these errors were encountered:
I want to mislead my users with stacked graphs, so I adopted the stacking code from https://leeoniya.github.io/uPlot/demos/stack.js (used by https://leeoniya.github.io/uPlot/demos/stacked-series.html).
It uses the
setSeries
hook to restack things when a series has been shown or hidden:However, the
setSeries
hook also fires when just hovering and focusing a series, so by just hovering over a graph with many series, a lot of extra computations are taking place and things get slow.Is there a nice way to distinguish between toggling a series vs. just hover-focusing, or would this require code changes to uPlot?
I guess I could do it right now by manually remembering & comparing the
show
states of all series between hook firings, but it would be nice to be able to just tell them apart.The text was updated successfully, but these errors were encountered: