sliceDashboard
sliceDashboard(T.Label: text) by T.‘a 🡒 ordinal, special
This functions activates a special display behavior for the dashboard referred to as slicing. When a dashboard is sliced, only a single slice is visible, plus all the non-sliced elements. This function can appear at most once in a script.
table T[t] = with
[| "Pants" as Product, "Blue" as Color |]
[| "Cap", "Red" |]
[| "T-shirt", "White" |]
T.slice = sliceDashboard(T.Product) by t
show table "One slice at a time" a1b3 slices: slice with
T.Product
T.Color
The sliceDashboard
function does several things:
- It introduces a slice selector drop-down in the upper-right corner of the dashboard.
- It creates a table named
Slices
along withslice
its primary dimension.
Slicing happens at the row level for tile inputs. This behavior is controlled via the slices:
tile option.
sliceDashboard(T.Label: text, T.SubLabel: text) by T.‘a 🡒 ordinal, special
Behaves like the one-argument variant of sliceDashboard
, but includes a sub-label that appears under the main label of the slice.
table T[t] = with
[| "Pants" as Product, "Blue" as Color |]
[| "Cap", "Red" |]
[| "Cap", "Green" |]
[| "T-shirt", "White" |]
T.slice = sliceDashboard(T.Product, T.Color) by t
show table "One slice at a time" a1b3 slices: slice with
T.Product
T.Color
While the value of T.Label
must be the same across all lines of a slice, it is possible for T.SubLabel
to take up to 255 distinct values. By default only the first one is shown, but searching in the slice selector will search through all provided sub-labels.