Library / Data visualization
Data visualization
Infara chart families, sparklines, and operational map surfaces. Use this route to compare chart variants and plan dashboard composition against the brand token palette.
Overview
Overview
Data visualization route
Operational charts and maps in one place. Chart families consolidate the upstream shadcn variants into disciplined Infara blocks with a single variant prop each; tokens come from the Infara palette.
Surfaces
Area, bar, line, pie, radar, and radial family blocks plus the existing Infara chart primitive and sparkline.
Data contract
Blocks stay presentational. Parents supply data, config, and a variant prop that maps to the upstream shadcn example it subsumes.
Maps
Leaflet-based embedded maps for context rails and workspace panes. Full-size operational maps stay on MapLibre GL per platform standards.
Chart families
Chart families
Area chart family
Default smooth curve plus stacked, gradient, linear, step, legend, icons, and axes variants. One block, nine variants — selected via the variant prop.
Bar chart family
Default plus horizontal, stacked, mixed-category, negative, labeled, and interactive variants. Interactive variant exposes active-series state to parent layers.
Line chart family
Monotone, linear, step, multi-series, dot variants, and labeled variants. Dots-custom renders hollow markers ideal for thin trend rails.
Pie & donut family
Simple pie, donuts with center label and active slice, two-ring stacked view, and an interactive variant where the parent owns the active key.
Radar family
Baseline polygon plus circle-grid, filled, no-lines, radius-axis, and legend variants. Useful for scorecards and maturity comparisons.
Radial family
Simple gauge, gridded ring, labeled bars, center-text readout, shape (progress) gauge, and stacked regional snapshots.
Dashboard chart primitives
Zero-recharts SVG primitives (area, bar) plus the recharts-wrapped line, pie, status, and type charts. Ship these when a page needs a single chart surface without pulling the showcase families.
Weekly traffic
Sessions vs. exports
Deployed radios by region
Vertical orientation
Fleet status
Vendor distribution
Tooltip & legend
Uses the Infara ChartContainer, ChartTooltip, ChartLegend primitives directly. Covers the upstream chart-tooltip-* variants: default, advanced, indicator-line, indicator-none, icons, formatter, label-custom, label-formatter, label-none.
Sparklines
Sparklines
Sparkline
Inline trend rails for dense surfaces. Color flows from currentColor so semantic tokens tint the trend without raw literals.
Use inside dense table rows or next to KPI numbers. Keep sparklines under 160px wide so they do not compete with the primary chart on the surface.
Maps
Maps
Leaflet map — embedded
Lightweight embedded map for context rails and sidebar views. The block owns tile selection and theme switching; parent layers supply markers and popups.
Map workspace — rail composition
Full-bleed map canvas with a context rail. Use Leaflet for embedded context and MapLibre GL for full operational workspaces per platform standards.