Visualization Components

April 3, 2026 ยท View on GitHub

Charts, graphs, and data visualization widgets.

Visualization

LineChart

Multi-series line chart rendered with Unicode braille characters for 2x4 sub-pixel resolution. Supports auto-scaling Y-axis, axes, legends, and multiple colored series.

PropTypeDefaultDescription
seriesLineChartSeries[]--Array of data series (required)
widthnumber--Chart width in columns
heightnumber--Chart height in rows
yMinnumberAutoY-axis minimum
yMaxnumberAutoY-axis maximum
showAxesbooleantrueShow X and Y axes
showLegendbooleanAuto (true if >1 series)Show color legend
axisColorstring | number--Axis line color
titlestring--Chart title
Plus layout propscolor, margin*, minWidth, maxWidth

LineChartSeries type:

PropertyTypeDefaultDescription
datanumber[]--Y-values
colorstring | numberAuto from paletteSeries color
namestring--Legend label

Basic: Single series

import { LineChart } from "@orchetron/storm";

<LineChart
  series={[{ data: [10, 25, 18, 40, 35, 50, 45], name: "Requests" }]}
  width={40}
  height={10}
/>

Advanced: Multi-series comparison

<LineChart
  series={[
    { data: latencyP50, name: "p50", color: "#34D399" },
    { data: latencyP95, name: "p95", color: "#FBBF24" },
    { data: latencyP99, name: "p99", color: "#F87171" },
  ]}
  width={60}
  height={15}
  yMin={0}
  yMax={500}
  title="Request Latency (ms)"
  axisColor="#505050"
  showLegend
  showAxes
/>

AreaChart

Braille-based area chart that fills below each line. Supports multiple series, stacked mode, axes, and legend.

PropTypeDefaultDescription
seriesChartSeries[]--Data series to plot
widthnumber60Chart width in cells
heightnumber10Chart height in rows
yMinnumberautoMinimum Y value
yMaxnumberautoMaximum Y value
showAxesbooleantrueShow Y-axis labels and X-axis line
showLegendbooleanautoShow series legend (auto if >1 series)
axisColorstring | numberdimAxis color
titlestring--Chart title
xLabelsstring[]--X-axis labels
fillDensity"full" | "sparse""full"Fill density below lines
stackedbooleanfalseStack series cumulatively
<AreaChart
  series={[{ name: "Revenue", data: [10, 20, 35, 28, 42], color: "#4ade80" }]}
  width={50} height={8} title="Revenue"
/>

BarChart

Vertical and horizontal bar charts with stacking, grouping, and interactive selection.

PropTypeDefaultDescription
barsBarData[]--Simple bars: [{label, value, color?}]
stackedStackedBarData[]--Stacked bars with segments
grouped{series, labels}--Grouped bars (side by side)
orientation"vertical" | "horizontal""vertical"Bar orientation
showValuesboolean--Show value labels on bars
widthnumber--Chart width
heightnumber--Chart height
colorstring | number--Default bar color
barGapnumber--Gap between bars
barWidthnumber--Bar width in characters
titlestring--Chart title
showAxesboolean--Show axes
interactiveboolean--Enable arrow key selection
isFocusedboolean--Whether chart has focus
animatedboolean--Animate bar height transitions
<BarChart
  bars={[
    { label: "Mon", value: 12 },
    { label: "Tue", value: 28 },
    { label: "Wed", value: 19 },
  ]}
  width={40} height={10} showValues
/>

ScatterPlot

Braille-based scatter plot with multiple series, trend lines, and interactive zoom/pan.

PropTypeDefaultDescription
seriesScatterPlotSeries[]--Data series ({ data: [x,y][], name?, color? })
widthnumber60Chart width in columns
heightnumber10Chart height in rows
xMin / xMaxnumberautoX-axis range overrides
yMin / yMaxnumberautoY-axis range overrides
showAxesbooleantrueShow axis labels
showLegendbooleanautoShow series legend
titlestring--Chart title
dotSize1 | 21Dot size (1=single, 2=2x2 cluster)
showTrendbooleanfalseShow linear regression trend line with R-squared
interactivebooleanfalseEnable interactive mode
isFocusedbooleanfalseWhether chart is focused
zoomablebooleanfalseEnable zoom (+/-) and pan (arrows)
renderTooltip(point, seriesIndex) => ReactNode--Custom tooltip renderer
<ScatterPlot
  series={[{ data: [[1,2],[3,5],[5,4],[7,8]], name: "Samples" }]}
  width={40}
  height={10}
  showTrend
/>

Heatmap

Colored grid for 2D data visualization with interpolated background colors. Supports interactive cell cursor and tooltips.

PropTypeDefaultDescription
datanumber[][]--2D data: data[row][col]
rowLabelsstring[]--Row labels (left side)
colLabelsstring[]--Column labels (bottom)
colorStopsstring[]--Multi-stop color gradient
colors[string, string]--(deprecated) Two-color ramp
showValuesboolean--Show numeric values in cells
cellWidthnumber3Cell width in characters
titlestring--Chart title
interactiveboolean--Enable arrow key cursor
isFocusedboolean--Whether chart has focus
<Heatmap
  data={[[1, 3, 5], [2, 4, 6], [7, 8, 9]]}
  rowLabels={["A", "B", "C"]}
  colorStops={["#1a1a2e", "#82AAFF", "#4ade80"]}
  showValues
/>

Histogram

Distribution visualization from raw data. Automatically bins and renders as vertical bar chart with optional mean/median markers.

PropTypeDefaultDescription
datanumber[]--Raw data values to bin
binsnumberautoNumber of bins
colorstring | number--Bar color
showCountsboolean--Show bin count above each bar
titlestring--Chart title
widthnumber--Chart width
heightnumber--Chart height
showMeanboolean--Show vertical mean line
showMedianboolean--Show vertical median line
cumulativeboolean--Cumulative distribution mode
<Histogram data={[1, 2, 2, 3, 3, 3, 4, 5]} bins={5} width={40} height={8} showMean />

Sparkline

Inline data visualization using Unicode block characters. Supports single-row or multi-row modes with optional labels.

PropTypeDefaultDescription
datareadonly number[]--Numeric data points (required)
widthnumberdata.lengthChart width in columns (max 80)
heightnumber1Chart height in rows (max 4)
minnumberAutoY-axis minimum
maxnumberAutoY-axis maximum
colorstring | numbercolors.brand.primaryBar color
fillColorstring | number--Empty space color in multi-row mode
labelstring--Label text centered below chart
Plus layout propsmargin*, minWidth, maxWidth

Basic: Inline sparkline

import { Sparkline } from "@orchetron/storm";

<Sparkline data={[4, 8, 15, 16, 23, 42, 38, 30, 25, 20]} color="#82AAFF" />

Advanced: Multi-row sparkline with label

<Box flexDirection="row" gap={4}>
  <Box flexDirection="column">
    <Text bold>CPU Usage</Text>
    <Sparkline data={cpuHistory} width={30} height={3} color="#34D399" label="Last 30s" />
  </Box>
  <Box flexDirection="column">
    <Text bold>Memory</Text>
    <Sparkline data={memHistory} width={30} height={3} color="#FBBF24" min={0} max={100} label="% used" />
  </Box>
</Box>

Gauge

Visual gauge display using graduated block characters (bar mode) or braille semi-circular arc (arc mode). Supports thresholds.

PropTypeDefaultDescription
valuenumber--Gauge value (0-100)
labelstring--Label text
colorstring | number--Bar/arc color
widthnumber--Gauge width
thresholdsGaugeThreshold[]--Color breakpoints [{value, color}]
showValueboolean--Show numeric percentage
variant"bar" | "arc""bar"Display variant
renderValue(value, label?) => ReactNode--Custom value renderer
<Gauge value={72} label="CPU" width={30} showValue thresholds={[{ value: 80, color: "red" }]} />

Diagram

Renders flowcharts and architecture diagrams using box-drawing characters and ANSI colors. Supports DAGs with fan-out and merge.

PropTypeDefaultDescription
nodesDiagramNode[]--Nodes with id, label, optional sublabel/color/width
edgesDiagramEdge[]--Edges with from/to ids and optional label
direction"horizontal" | "vertical""horizontal"Flow direction
nodeStyle"round" | "single" | "double" | "heavy"--Node border style
arrowCharstringautoArrow character
gapXnumber4Horizontal gap between nodes
gapYnumber2Vertical gap between rows
colorstring | number--Default node color
edgeColorstring | number--Arrow/line color
<Diagram
  nodes={[
    { id: "a", label: "Start" },
    { id: "b", label: "Process" },
    { id: "c", label: "End" },
  ]}
  edges={[{ from: "a", to: "b" }, { from: "b", to: "c" }]}
/>

Canvas

Declarative visualization component for AI-generated diagrams. Takes a JSON-serializable tree of nodes and edges.

PropTypeDefaultDescription
nodesCanvasNode[]--Tree of nodes to render
edgesCanvasEdge[][]Connections between nodes
titlestring--Canvas title
direction"horizontal" | "vertical""vertical"Layout direction
widthnumber--Canvas width
borderStyle"round" | "single" | "double" | "heavy" | "none"--Outer border style
borderColorstring | number--Outer border color
paddingnumber--Inner padding
<Canvas
  title="Architecture"
  nodes={[
    { id: "api", type: "box", label: "API Gateway" },
    { id: "svc", type: "box", label: "Service" },
  ]}
  edges={[{ from: "api", to: "svc" }]}
/>

GradientProgress

Progress bar with multi-stop color gradient on the filled portion and soft falloff edge.

PropTypeDefaultDescription
valuenumber--Progress value (0-100)
widthnumber--Bar width
colorsstring[]violet to mintMulti-stop gradient colors
fromColorstring--(deprecated) Start color
toColorstring--(deprecated) End color
showPercentageboolean--Show percentage label
labelstring--Label text
<GradientProgress value={65} width={40} colors={["#9B7DFF", "#6DFFC1"]} showPercentage />

Back to Components