stat: "count"

Count rows (or sum weights) per distinct x within each group. Default for geom_bar; publishes after_stat count.

Usage

import { GGPlot, GeomBar } from "@ggsvelte/svelte";

<GGPlot data={rows} aes={{ x: "x" }}>
  <GeomBar stat="count" />
</GGPlot>
{
  "geom": "bar",
  "stat": "count"
}

Generated columns (after_stat)

Resolve these with channel objects such as { stat: "count" } in aes.

  • count

Default for geoms

Compatible geoms

Examples

← All stats · Geoms · Statistics and positions