spread
The spread operator is used to spread the data across the x or y axis.
chart(seafood).flow(spread('lake', { dir: 'x' })).mark(rect({ h: 'count' }));
Graphical operators are used to used to arrange, overlay, and connect visual elements.
The spread operator is used to spread the data across the x or y axis.
chart(seafood).flow(spread('lake', { dir: 'x' })).mark(rect({ h: 'count' }));
The stack operator is used to stack the data across the x or y axis.
chart(seafood).flow(stack('lake', { dir: 'x' })).mark(rect({ h: 'count' }));
The scatter operator is used to scatter the data across the x or y axis.
chart(seafood).flow(scatter('lake', { dir: 'x' })).mark(rect({ h: 'count' }));
The group operator is used to group the data by a given key.
chart(seafood).flow(group('lake')).mark(rect({ h: 'count' }));
The derive operator is used to derive a new column from the data.
chart(seafood).flow(derive((d) => d.count * 2)).mark(rect({ h: 'count' }));