Expand description
Chart view state: the chart’s spec and the panel that edits it.
The spec is a set of shelves, named as Vega-Lite names them so a later version
can save it: mark (the Type shelf), encoding.x.field with its timeUnit,
encoding.y.field with its aggregate, and encoding.color.field. Every chart
type shows the same shelves; a shelf a type does not use is dimmed, never
hidden (ChartModal::shelf). Options that are not part of what is charted
(bins, ranges, the grid, the sample size) sit beside the spec.
The panel is one form of the shared focus model (crate::app::form); column and
value rows are edited through the one shared Picker.
Structs§
- Chart
Columns - The view’s columns a chart can take, by role.
- Chart
Modal - Chart view state: the spec, the options, and the panel’s focus.
- Chart
Spec - What is charted.
- Color
Counts - The values of the Color column, most rows first, as the chart’s last count found them: what the value picker lists.
- Color
Encoding - Encoding
- Rows
Draft - A change to the Rows row not yet read: ←/→ or a typed size waits for Enter, or for focus to leave the row, so the chart reads once rather than per key.
- XEncoding
- YEncoding
Enums§
- Aggregate
- What a Y value is, per X (and color): the column as it is, or an aggregate of the rows that share it.
- Chart
Focus - One row of the panel: a shelf, the line under it, or an option.
- Cumulative
- A running total of the aggregated Y, along X.
- Mark
- The Type shelf: what marks the chart draws.
- Picker
For - What the open Picker edits.
- Shelf
Use - Whether a shelf takes part in the chart on screen.
- Time
Unit - How a temporal X is bucketed before Y is aggregated.
Constants§
- CHART_
ROW_ LIMIT_ MAX - The largest sample size (Polars slice takes u32).
- COLOR_
MAX - Series a color splits a chart into, at most: one per palette color
(
chart_1tochart_10). A terminal of fewer colors draws fewer:ChartModal::series_max. - HEATMAP_
DEFAULT_ BINS - Default heatmap bin count (applies to both axes).
- HEATMAP_
MAX_ BINS - HEATMAP_
MIN_ BINS - HISTOGRAM_
DEFAULT_ BINS - Default histogram bin count.
- HISTOGRAM_
MAX_ BINS - HISTOGRAM_
MIN_ BINS - KDE_
BANDWIDTH_ MAX - KDE_
BANDWIDTH_ MIN - KDE bandwidth multiplier bounds and step.
- KDE_
BANDWIDTH_ STEP - NONE_
ITEM - The item a Picker offers for “nothing”: no Color, no category on a box plot.
- QUANTILES
- The percentiles the quantile steps through.
- QUANTILE_
DEFAULT - The percentile a quantile starts at.
- Y_
SERIES_ MAX - Most Y columns a line or scatter chart draws at once.