Hylograph.Components.BoxPlot
- Package
- purescript-hylograph-components
- Repository
- afcondon/purescript-hylograph-components
Box plot component.
Shows the distribution of value within each category: a box spanning
q1 to q3 with a median line; whiskers extending to the farthest
non-outlier value within whiskerIQRMultiplier × IQR of the quartiles;
outliers rendered as separate dots.
Multi-series is analogous to BarChart with Grouped stacking — each
(category, series) pair gets its own sub-box within the category's
allocated band, coloured from theme.categoricalPalette.
Quartiles are computed via linear interpolation (the usual "type 7" percentile) on the sorted values within each (category, series) group.
Key / tooltip channels: unlike per-row marks, a box aggregates many rows.
The Encoding still carries key and tooltip for API consistency with
the rest of the library, but the box itself uses a synthesized key of
the form <category>·<series> and a synthesized tooltip built from the
computed statistics (n, q1, median, q3, whiskers, outlier count). The
per-row key/tooltip projections are currently unused; they are held
in reserve for future outlier-level interaction.
#Orientation Source
data OrientationBox orientation. Vertical = categories along X, values up Y (default).
Only Vertical is honoured in v1; Horizontal is declared so downstream
Config-editing tools (Atelier) can offer it as a toggle, but the render
path currently ignores it.
Constructors
#config Source
config :: forall r. { category :: Record r -> String, value :: Record r -> Number } -> Config rSmart-constructor with reasonable defaults.
Caller provides the two essential projections (category, value). series
defaults to \_ -> ""; key defaults to category; tooltip defaults
to "<category>: <value>". Note these per-row projections are unused
for the box itself (see module-level note); they are defaulted for API
consistency.
- Modules
- Hylograph.
Components. Annotation - Hylograph.
Components. Axis - Hylograph.
Components. BarChart - Hylograph.
Components. Binning - Hylograph.
Components. BoxPlot - Hylograph.
Components. Frame - Hylograph.
Components. Heatmap - Hylograph.
Components. Layout - Hylograph.
Components. Legend - Hylograph.
Components. LinePlot - Hylograph.
Components. LineStyle - Hylograph.
Components. Mark - Hylograph.
Components. PieChart - Hylograph.
Components. ScatterPlot - Hylograph.
Components. Series - Hylograph.
Components. Theme - Hylograph.
Components. Treemap