Skip to content
Gordon Woodhull edited this page Mar 27, 2019 · 9 revisions

What sort of data is each chart expecting?

Every chart takes the output of group.all(), i.e. an array of {key,value} pairs. However, the interpretation of the key can vary, and some charts take multiple groups.

Bubble chart and bubble overlay

By default, X and Y are driven by the keyAccessor and valueAccessor, respectively. However, these can be overridden to give bubbles some other identity if they change coordinates in response to filters.

Scatter plot and heatmap

The key is an array of X and Y coordinates. This does not allow symbols/cells to change position. (#621, #702). But it is somewhat necessary for brushing, since a filter can only look at the key.

Sometimes people stick the color in a third element of the array because it's easier to create a custom key than a custom value.

Bar chart and line chart

Key is X value and value is Y value (by default). Stacking introduces extra groups which must have the same keys.

Composite chart

All bets are off since the dimension and group can be specified independently for each child chart. However, in order for brushing to work, the keys must be consistent across charts, because the composite will tell each child chart to filter on its RangedFilter.