Closed fgregg closed 8 months ago
This isn’t currently technically possible because the stack transform computes extents for each value (y1–y2); the total across the entire stack isn’t accessible. And also stacks are diverging with negative values, so would you want to plot the minimum value too? Or only if it isn’t zero? That feels too niche to me.
You can plot the total value if you use the group or bin transform (instead of stack), but then you lose the per-series value, and also you’d have two tips simultaneously visible.
Plot.lineY(
pulsed_eviction_rate,
Plot.binX(
{ y: "sum", reverse: cumulative === "normal" },
{
x: "date",
interval: "day",
y: "count",
curve: "step",
cumulative: cumulative === "cumulative",
tip: true,
inset: 0
}
)
),
I can’t think of a way to show both the series value and the total value.
thanks for your consideration!
In this chart, hovering over a geometry gives the value for the that group. It would be excellent if it also gave the total, stacked value.
https://observablehq.com/@fgregg/chicago-shelter-eviction-rates#cell-229