Build a StackedBarSeries from a Map of grouped series — one series
per stack group. This is the natural reader for pond's grouped-aggregate output:
series.partitionBy('host', { groups }).aggregate(Sequence.every('5m'), { n: 'count' }).toMap()
yields a Map<host, TimeSeries>, one interval-keyed series per host. The stack
order (groups, bottom → top) is the map's insertion order (stable when you
pass partitionBy's { groups } option).
Aligned by bucket key, not by index. Each partition's aggregate spans only
its own events' range, so the groups generally have different grids (host A
might have buckets 0–8, host B buckets 3–9). This reader takes the union of
every group's [begin, end) slots (ascending) and places each group's column
value at the matching begin; a bucket a group is missing reads as a gap
(NaN, contributing nothing to that stack). So the segments always line up on
the real bucket, never on a positional accident. (Pass aggregate's
{ range } option if you want every group padded to one dense grid — the union
is then that grid.) When two groups carry the same begin, the first
group's end sets that slot's width — correct for the uniform-width buckets
aggregate / pivotByGroup produce (all groups share the grid width), which is
the intended input.
Build a StackedBarSeries from a
Mapof grouped series — one series per stack group. This is the natural reader for pond's grouped-aggregate output:series.partitionBy('host', { groups }).aggregate(Sequence.every('5m'), { n: 'count' }).toMap()yields aMap<host, TimeSeries>, one interval-keyed series per host. The stack order (groups, bottom → top) is the map's insertion order (stable when you passpartitionBy's{ groups }option).Aligned by bucket key, not by index. Each partition's
aggregatespans only its own events' range, so the groups generally have different grids (host A might have buckets 0–8, host B buckets 3–9). This reader takes the union of every group's[begin, end)slots (ascending) and places each group'scolumnvalue at the matchingbegin; a bucket a group is missing reads as a gap (NaN, contributing nothing to that stack). So the segments always line up on the real bucket, never on a positional accident. (Passaggregate's{ range }option if you want every group padded to one dense grid — the union is then that grid.) When two groups carry the samebegin, the first group'sendsets that slot's width — correct for the uniform-width bucketsaggregate/pivotByGroupproduce (all groups share the grid width), which is the intended input.