-
Notifications
You must be signed in to change notification settings - Fork 2
Home
David Mesquita-Morris edited this page Nov 3, 2021
·
3 revisions
This Wiki shows some common patterns and idioms while using the combination of steelbreeze/pivot and steelbreeze/landscape.
To create a label for a dimension, create the following function:
function labelled(key) {
return value => [
{ key: "Label", value: key, predicate: () => true },
{ key, value, predicate: row => row['position'] === value }
];
}
Then use it in the last parameter of the dimension function:
const dim = pivot.dimension(values, "position", labelled("position"));