Best Practice for zIndex on Wave Dashboard Layouts
|Knowledge Article Number||000233814|
Dashboard widgets can be layered by defining the zIndex. This tells the engine how to handle overlapping components. Widgets with a relatively lower zIndex value will appear behind widgets with relatively higher zIndex values. When processing the layout for a dashboard, the entire structure is scanned for each layer from background to foreground. This means that the number of layers present (the zIndex range) will have a multiplying effect on the processing and load time for dashboards.
Performance characteristics work out approximately as follows:
range(zIndex) x numWidgets x numPages ~ running time
The dashboard contains a box that contains two other boxes that each contain two widgets.
zIndex range: 7
zIndex range: 3
It will take over twice as long to process the layout for the inefficient example.
Even if a layer doesn't contain any widgets, it will still be scanned during layout processing. This means if you arbitrarily set a zIndex to something like -50 or 120, it will significantly increase the processing time.
Keep your overall zIndex range small.
By default, widgets have a zIndex of 0. If you need a background, use -1 (or -2 if needed), but do not use an arbitrarily larger range.