Master Slave behavior between cards
Some cards like ChartViewer, HistoryListSelector, PeriodSelector... can interact with each other to create enhance behavior on a FlexView. One card can pass information to another whenever a user interacts with a card. This is very convenient to create enhance interactions for users.
This why there is this concept of master / slave. One card may be a master, another a slave listening to this master. End of theory, let's make it concrete:
- Observe below how the top card (a PeriodSelector) is interacting with the one in the bottom (a ChartViewer)
- Whenever we change the period, the card at the bottom, is reloading with new data
This is possible because the ChartViewer is a "slave" on the period selection. There is always a default selection, but this one is used only if no master is on the page.
Don't forget to always accept the permissions
This concept is very generic and exists now by default for:
- HistorySelection
- TimerangeSelection
Since there is a SDK, you can extend the concept to any data you may want to share between cards.
This is a bigger example using the master / slave concept using 4 cards
- ChartBookmark (at the top to save a specific a selection of histories and timerange)
- HistoryListSelector to select histories from a list
- PeriodSelector to navigate through the period
- ChartViewer to display the data (slave on the history selection AND on the timerange)