{
  "example": "import { BarChart } from \"@godxjp/ui/charts\";\n\n<BarChart\n  label={t(\"report.salesByRegion\")}\n  data={data}\n  categoryKey=\"region\"\n  series={[{ dataKey: \"sales\", label: t(\"metric.sales\") }]}\n  numberFormat={{ notation: \"compact\" }}\n/>",
  "group": "data-display",
  "importPath": "@godxjp/ui/charts",
  "name": "BarChart",
  "props": [
    {
      "description": "Row data: one category per row with a numeric value per series.",
      "name": "data",
      "required": true,
      "type": "ChartDatum[]"
    },
    {
      "description": "Plotted series: { dataKey, label?, color?, fillColor? }. `fillColor` paints the filled band independently of the line's `color`; it defaults to `color`.",
      "name": "series",
      "required": true,
      "type": "ChartSeriesProp[]"
    },
    {
      "description": "Key into each datum holding the category label.",
      "name": "categoryKey",
      "required": true,
      "type": "string"
    },
    {
      "description": "Accessible name + visible caption.",
      "name": "label",
      "required": true,
      "type": "string"
    },
    {
      "defaultValue": "true",
      "description": "Paint `label` as a visible caption. Set false when a CardTitle or section heading already says it — the caption stays in the DOM as sr-only, so role=img keeps its accessible name.",
      "name": "showCaption",
      "type": "boolean"
    },
    {
      "description": "Extra context appended to the screen-reader description.",
      "name": "description",
      "type": "string"
    },
    {
      "defaultValue": "\"md\"",
      "description": "Canvas height preset. Ignored when `height` is set.",
      "name": "size",
      "type": "\"xs\" | \"sm\" | \"md\" | \"lg\""
    },
    {
      "description": "Explicit canvas height in px (overrides `size`).",
      "name": "height",
      "type": "number"
    },
    {
      "defaultValue": "true",
      "description": "Show the series legend.",
      "name": "showLegend",
      "type": "boolean"
    },
    {
      "defaultValue": "true",
      "description": "Show the cartesian background grid.",
      "name": "showGrid",
      "type": "boolean"
    },
    {
      "description": "Locale-aware formatting for ticks + tooltip values.",
      "name": "numberFormat",
      "type": "Intl.NumberFormatOptions"
    },
    {
      "description": "Explicit [min, max] for the VALUE axis (y vertical, x on a horizontal bar). Omit to let the data set it. A non-zero baseline is a charting-ETHICS call: legitimate where the SHAPE is the message and zero is not a reference (price, temperature, an index, a latency percentile), misleading wherever the reader compares magnitudes — which is every bar chart.",
      "name": "valueDomain",
      "type": "[number, number]"
    },
    {
      "description": "Explicit tick positions on the value axis, in data units. Values outside valueDomain are not drawn.",
      "name": "valueTicks",
      "type": "number[]"
    },
    {
      "defaultValue": "false",
      "description": "Stack series into one bar instead of grouping side by side.",
      "name": "stacked",
      "type": "boolean"
    },
    {
      "defaultValue": "false",
      "description": "Lay bars out horizontally (category on the y-axis).",
      "name": "horizontal",
      "type": "boolean"
    },
    {
      "description": "Message shown when `data` is empty.",
      "name": "emptyMessage",
      "type": "string"
    }
  ],
  "related": [
    "LineChart — continuous trend rather than discrete comparison.",
    "PieChart — single part-to-whole composition.",
    "DataTable — exact tabular figures."
  ],
  "rules": [],
  "tagline": "Compare a value across categories — grouped or `stacked`, vertical or `horizontal`, with localized ticks/tooltips and a built-in text alternative. Data-visualization graph / plot / diagram.",
  "usage": [
    "DO import from the charts entry: `import { BarChart } from \"@godxjp/ui/charts\";` (recharts optional peer required).",
    "DO import only the chart a screen uses — `import { BarChart } from \"@godxjp/ui/charts/bar-chart\";` — when the `./charts` barrel should not link the whole chart family. Without the `recharts` peer the build then fails ONCE, naming the package and the fix.",
    "DO use `horizontal` when category labels are long (they read better on the y-axis).",
    "DO use `stacked` for part-to-whole-per-category; keep grouped (default) for direct side-by-side comparison.",
    "DON'T use BarChart for a single part-to-whole total — that is PieChart. DON'T fake bars with styled divs."
  ],
  "useCases": [
    "Sales by region / category comparison.",
    "Stacked composition per period (e.g. expense breakdown by month).",
    "Ranking with long labels (horizontal)."
  ]
}
