# Charts

Nine chart families computed in Ruby and shipped as finished SVG in the initial HTML - valid in print, PDF, email, and without JavaScript, with live streaming and a frozen chart-spec for BYO engines.

poetry-charts computes chart geometry in Ruby - data to domains, scales, ticks, and paths - and ships the finished chart as SVG in the initial HTML, so charts stay valid with JavaScript disabled, in print, PDF, and email. Nine families ship in the gallery: area, bar, line, pie, radar, radial bar, scatter, and composed, plus the adapter mount; `poetry_area_chart`, `poetry_line_chart`, and `poetry_bar_chart` are dedicated helpers and `poetry_chart(:pie, ...)` dispatches every family, composed from slots (`with_grid`, `with_x_axis`, `with_area`, `with_tooltip`, `with_legend`). Install with `gem "poetry-charts"` plus `bin/rails g poetry:install --charts`. The cartesian trio takes `live: true` for data that cannot round-trip: the chart embeds its spec plus a client renderer proven byte-equal to the Ruby engine and redraws in place, and live mode unlocks the client-side brush and zoom window. Every chart also compiles to a frozen chart-spec v1; `engine:` routes the same call to a registered adapter (`series:`/`axes:` arguments instead of slots) for bring-your-own engines. Colors ride the theme's `--chart-1` through `--chart-5` ramp with a per-series `--color-<key>` variable, so theme and dark-mode flips restyle every chart with zero re-render.
