Hylograph.Components.Heatmap
- Package
- purescript-hylograph-components
- Repository
- afcondon/purescript-hylograph-components
Heatmap component.
A grid of rectangular cells laid out on two categorical axes (x, y),
each cell coloured by a continuous value via a Number -> String
interpolator (defaulting to interpolateViridis). Canonical use case:
day-of-week × hour-of-day activity grids, confusion matrices, calendar
heatmaps.
Unlike the cartesian charts in this library, cell colour does not come
from series — it comes from value run through interpolator.
series still lives on the Encoding (defaulting to \_ -> "") so two
heatmaps on the same page can share a highlightGroup and coordinate
hover across matching cells.
Value domain is auto-inferred from the dataset; override via
valueDomain when you want a fixed scale (e.g. comparing two heatmaps
side by side).
#config Source
config :: forall r. { value :: Record r -> Number, x :: Record r -> String, y :: Record r -> String } -> Config rSmart-constructor with reasonable defaults.
Caller provides the three essential projections (x, y, value). key
defaults to x + "·" + y, tooltip to "<x>·<y>: <value>", series
to the empty string. Interpolator defaults to viridis; valueDomain is
auto-derived from the dataset when left as Nothing.
- 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