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
Hello! I am currently writing a plugin for creating relations between datasets.
The goal is to be able to have an index dataset that is tied to another dataset.
I am differentiating them by label right now. The index dataset should be shown whenever the corresponding dataset it has a relation to is.
To be able to do this I'm looking at the visibility of datasets in beforeDatasetsUpdate and setting their new visibility states using chart.setDatasetVisibility. The problem I'm having is to derive the next state using the plugin lifecycle hooks. beforeDatasetsUpdate works fine for getting the current state, but when set from within the render is always one step behind.
Has anyone done this? Is it possible to pass down state between lifecycle methods in some way? and still doing all this after the charts have received their new state, but not yet rendered?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello! I am currently writing a plugin for creating relations between datasets.
The goal is to be able to have an index dataset that is tied to another dataset.
I am differentiating them by label right now. The index dataset should be shown whenever the corresponding dataset it has a relation to is.
To be able to do this I'm looking at the visibility of datasets in
beforeDatasetsUpdate
and setting their new visibility states usingchart.setDatasetVisibility
. The problem I'm having is to derive the next state using the plugin lifecycle hooks.beforeDatasetsUpdate
works fine for getting the current state, but when set from within the render is always one step behind.Has anyone done this? Is it possible to pass down state between lifecycle methods in some way? and still doing all this after the charts have received their new state, but not yet rendered?
Beta Was this translation helpful? Give feedback.
All reactions