Skip to content
OGE logoOGE

Charts API

Complete API reference for @oge-ui/charts. The kernel — 1-2-5 nice-tick scales, calendar-true time ticks, stacking, bar slotting, single-path builders, pie layout, zoom math and the O(log n) hit-testing — is pure TypeScript inside the package; live demos are on the overview page.

Properties Methods Events Types

OgeChart

oge-chart

Properties 29

Data & series

Name Type DefaultDescription
dataSourcereadonly T[][]Data items; never mutated.
seriesreadonly OgeChartSeriesInput[][]Series definitions: type (26 kinds — see OgeChartSeriesType), field mapping (valueField/argumentField — names, dotted paths or getters), name, color, axis (value-axis index), stack group, dashStyle/width/opacity, showInLegend, rangeArea bounds (value1Field/value2Field) and candlestick/ohlc OHLC (openField/highField/lowField/closeField), sizeField (bubble area), visible (start hidden; the legend re-shows) and showLabels (shorthand for label.visible). The per-point, label and analytics options are listed under Series options. Null/NaN values render as gaps.
commonSeriesPartial<OgeChartSeriesInput>{}Defaults merged under every series (dx commonSeriesSettings parity).
palettereadonly string[] | undefined—Series colors; defaults to the 10-color OGE_CHART_PALETTE (concrete hex values so exported images keep their colors).

Series options (OgeChartSeriesInput)

Name Type DefaultDescription
labelOgeChartLabelOptions—Data labels on any cartesian or polar series: { visible?, position?, format?, showForZero?, overlap? }. position: 'outside' (default; past the bar end / above the point), 'inside'/'insideEnd', 'center', 'insideBase' — inside labels pick a contrasting text colour from the mark. format(info) returns the text (info.text is the SI default, info.percent the full-stacked/pareto share). overlap: 'hide' (default) drops a label that would cover an earlier one, 'shift' nudges it clear first, 'none' keeps all; labels are always pulled inside the plot. Labels never change the screen-reader data table.
colorField / customizePointfield | (info: OgeChartPointInfo) => OgeChartPointStyle—Per-point colour from the data, or a hook returning { color?, label?: { visible?, text? }, marker?: { visible?, size? }, description? } per point (wins over colorField). Bars, markers, candles, OHLC ticks, boxes and polar sectors take the colour; the legend swatch stripes the distinct colours; the tooltip marker follows the point. description is spoken in the tooltip, the announcement and the sr-table cell — colour is never the only channel.
trendlineOgeTrendlineType | OgeChartTrendlineOptions—A regression or smoothing line over the series: 'linear' | 'exponential' | 'logarithmic' | 'polynomial' | 'movingAverage', or { type, order? (polynomial 2–6), period? (moving average), color?, width?, dashStyle? ('dash'), showR2? }. showR2 appends the trend value and R² to the series' tooltip row. The fit is the pure ogeTrendline().
indicatorOgeChartIndicatorOptions—For type: 'indicator': { type: 'sma' | 'ema' | 'bollinger' | 'macd' | 'rsi', period?, stdDev?, fastPeriod?, slowPeriod?, signalPeriod?, levels? } computed from valueField (or closeField of OHLC data). Bollinger draws a band and two lines, MACD a signal line and a histogram, RSI reference levels at 30/70. Default names like SMA (10) come from messages.values. Put RSI/MACD into their own pane: pane: 'rsi' on the series plus a panes entry and a value axis with pane: 'rsi'.
summaryField / upColor / downColor / totalColor / showConnectorsfield / string / string / string / boolean—waterfall: values are deltas floating from the running total; summaryField marks sums — 'total' (or true) spans zero → running total, 'intermediate' the subtotal since the previous intermediate sum. Rising/falling/sum bars colour upColor (green), downColor (red), totalColor (the series colour); dashed connectors join the bars (showConnectors: false drops them). The sr table and tooltip say increase/decrease/total.
valuesField / q1Field / medianField / q3Field / outliersField / whiskersfield / … / 'tukey' | 'minMax'—boxPlot: from raw values (valuesField holding a number[] per category — quartiles by linear interpolation, Tukey 1.5 × IQR whiskers by default, the rest as outlier dots) or precomputed (lowField/q1Field/medianField/q3Field/highField, outliersField). The tooltip and sr table read Min, Q1, Median, Q3, Max. Pure: ogeBoxStats().
binsOgeHistogramBinning—histogram: bins valueField over the whole data source — { count? } (default: Sturges' rule, rounded to a 1-2-5 width), { width? } or explicit { thresholds? } edges. Bars span their bins on a linear argument axis; the argument reads start – end. Pure: ogeHistogramBins().
cumulativeAxis / cumulativeColornumber / string—pareto: categories sort by value (descending) and a cumulative-% line with dots runs over the bars. cumulativeAxis puts the line on a declared value axis (give it position: 'end'; it spans 0–100); without one the line uses an implicit 0–100% scale. The tooltip adds cumulative 45%.

Axes

Name Type DefaultDescription
argumentAxisOgeChartAxisOptions{}Argument axis: type auto-detects (numbers / dates / categories) when unset; min/max, inverted, grid, title; label (OgeChartAxisLabelOptions: format as a function or Intl options, template such as '{value} km', overlap rotate/stagger/hide/skip/none, visible) — labelFormat/labelOverlap remain as shorthands; tickInterval (axis units, every n-th category, or a calendar interval such as { weeks: 1 }), minorTicks, strips and constantLines.
valueAxisOgeChartAxisOptions | readonly OgeChartAxisOptions[]{}One or more value axes; series pick theirs via axis (or by pane). position: 'end' renders on the far side (right, or on top when rotated), type: 'logarithmic' spaces decades evenly, abbreviate: false disables SI labels (1.2K). pane places the axis in a pane; constantLines ({ value, label?, color?, dash?, width?, position: 'inside' | 'outside' }) draw threshold / target lines whose labels stay clear of the plot edges; strips ({ start, end, label?, color? }) shade value bands; breaks ({ start, end }[], linear axes) skip value ranges with a zig-zag marker; tickInterval, minorTicks, allowDecimals: false and label work as on the argument axis.
stripLinesreadonly OgeChartStripLine[][]Argument-axis markers: { start, end?, label?, color? } — a line without end, a shaded band with it (see also argumentAxis.strips / constantLines).
annotationsreadonly OgeChartAnnotation[][]Plot annotations: type: 'point' draws a marker dot with a connector into a label box at (argument, value); 'text' places the label alone (top of the plot without a value). axis, color and offsetX/Y refine placement.

Layout & direction

Name Type DefaultDescription
rotatedbooleanfalseSwaps the axes: the argument axis runs vertically (first argument on top), the value axis horizontally. Applies to every series type — bars become horizontal bars (stacked and range bars too), lines run top-down — and the tooltip, crosshair, zoom/pan, the data table and the keyboard follow (Up/Down walk the arguments, Left/Right the series).
panesreadonly OgeChartPane[][]Plot areas stacked over one shared argument axis (price + volume): { name, height? } with height as a ratio. Series pick a pane with pane (binding to that pane's first value axis, or a default one) and value axes with valueAxis[].pane; stacks and bar slots are per pane. The argument axis sits under the last pane, the crosshair spans every pane (its horizontal line stays in the hovered one) and zoom/pan move them together. Rotated charts lay panes side by side.
rtlEnabledboolean | undefinedundefinedRight-to-left layout: mirrors the argument axis, moves the value axes to the other side, flips the legend, the tooltip's opening side and the Left/Right arrow keys. Unset follows the page — the computed direction or the nearest dir attribute, read after the first render (re-read by refresh()); an explicit value also sets dir on the host.

Interaction

Name Type DefaultDescription
zoomEnabled / panEnabled'none' | 'wheel' | 'drag' | 'both' / boolean'none' / falseCursor-centered wheel zoom, drag-select zoom (Escape cancels mid-drag, 8px threshold), Shift+drag pan. Escape on the focused plot resets the zoom. On touch screens two fingers pinch-zoom and pan together (the argument values under both fingers stay under them) and one finger pans when panEnabled is on, otherwise drag-zooms; the plot declares touch-action so the page still scrolls across the argument axis.
visualRangeOgeChartRange | nullnullThe zoom window in argument-axis units (null = full extent). Two-way ([(visualRange)]); writes clamp into the data bounds.
tooltipOgeChartTooltipOptions{}{ enabled?, shared? } — shared lists every series at the hovered argument; otherwise the value-nearest series wins.
crosshairOgeChartCrosshairOptions{}{ enabled?, horizontal? } — the vertical tracker snaps to the nearest argument (binary search).
legendOgeChartLegendOptions{}{ visible?, position? (top/bottom/start/end), interactive? } — real buttons with aria-pressed; clicking toggles the series and the axes rescale.
selectionMode / selectedPoints'point' | 'series' | 'none' / readonly OgeChartPointRef[]'none' / []Click (or Enter) selects; Ctrl adds points to the set; series mode selects the whole series. Two-way ([(selectedPoints)]).

Appearance & i18n

Name Type DefaultDescription
title / subtitlestring''Headings above the plot.
animationboolean | OgeChartAnimationOptionstrueHover/selection transitions, a one-time draw-in on the first render with data — each series grows from its value baseline (bars grow, lines rise) in every orientation — and tweens on every later data change: marks are matched by series name and category and glide to their new geometry, new marks grow from the baseline, removed ones shrink to it, line and area paths morph point by point; a legend toggle fades the series out (or in) while the value axis re-scales. New data arriving mid-tween continues from the frame on screen. Resizes, zoom and pan stay immediate. { enabled?, duration? (ms, 600 — draw-in and tweens), easing? ('linear' | 'ease' | 'easeIn' | 'easeOut' | 'easeInOut') }; the presets follow the motion tokens (easeOut → --oge-motion-easing-decelerate, easeIn → -accelerate, ease/easeInOut → -standard). false turns everything off and prefers-reduced-motion: reduce always does.
localestring | undefined—BCP 47 locale for every Intl format; defaults to the config locale, then the browser locale.
messagesPartial<OgeChartsMessages>{}Per-instance message overrides, merged over the DI config per top-level block.

Methods 12

Name Type Description
zoomToRange(range) / resetZoom()voidProgrammatic zoom (clamped into the data bounds) / back to the full extent, announced.
hideTooltip()voidClears the hover state (tooltip + crosshair).
refresh()voidRe-measures the container (ResizeObserver normally covers it).
focus()voidFocuses the keyboard-inspectable plot region.
getExportData()OgeChartExportData<T>Snapshot for custom pipelines: per-series names/types/colors/visibility/points plus the plotted range.
getSvgElement()SVGSVGElementThe live SVG root — what the image exporters serialize.
print(options?)Promise<void>Opens the browser print dialog for the chart alone: the serialized SVG (computed styles inlined) in a hidden frame with a print stylesheet — the title above it, the chart scaled to the page, @page orientation from its aspect. OgeChartPrintOptions: { title?, orientation?, background? }. Dependency-free.

Export entry points (lazy)

Name Type Description
exportChartToPng / exportChartToJpeg / exportChartToSvg / serializeChartSvg / rasterizeChartSvg@oge-ui/charts/export-imageNo third-party libraries: the live SVG is cloned with computed styles inlined, then downloaded as a standalone .svg, or rasterized onto a canvas (pixelRatio, background) for .png or .jpeg (quality, default 0.92 — JPEG has no alpha, so the background fills first). rasterizeChartSvg(svg, options) returns that canvas for custom pipelines. Import the entry point dynamically.
exportChartToPdf / buildChartPdfDocument / chartPdfLayout@oge-ui/charts/export-pdfA one-page PDF: the chart rasterized like the PNG export and embedded into a jsPDF page (orientation from the aspect, pageFormat a4, margin 12 mm) under an optional title/subtitle drawn as real PDF text with font — or the font registered via setOgePdfDefaultFont() from @oge-ui/behavior (Turkish, Greek, Cyrillic need a Unicode font). jspdf is an optional peer pulled in only by this entry; buildChartPdfDocument returns the jsPDF document, chartPdfLayout the pure page geometry.

Analytics (pure functions)

Name Type Description
ogeSma / ogeEma / ogeBollingerBands / ogeMacd / ogeRsi(values, period, …) => aligned arraysThe technical indicators the indicator series runs, for your own pipelines: ogeSma(values, period), ogeEma(values, period) (seeded with the first SMA), ogeBollingerBands(values, period = 20, stdDev = 2) → { middle, upper, lower }[], ogeMacd(values, 12, 26, 9) → { macd, signal, histogram }[], ogeRsi(values, 14) (Wilder). Input: numbers or { value } objects; output aligned with the input, null until the window fills.
ogeTrendline(points, type, options?) => OgeTrendlineFit | nullLeast-squares fits over { x, y } points: 'linear', 'exponential' (y > 0), 'logarithmic' (x > 0), 'polynomial' (order 2–6, x normalized so epoch-ms arguments stay well-conditioned) and 'movingAverage' (period). Returns { coefficients, r2, predict(x), points }.
ogeBoxStats / ogeHistogramBins(values, …) => OgeBoxStats | OgeHistogramBin[]ogeBoxStats(values, 'tukey' | 'minMax') → { low, q1, median, q3, high, mean, outliers }; ogeHistogramBins(values, { count?, width?, thresholds? }) → { start, end, count, indexes }[] (the last edge inclusive).

Events 5

Name Type Description
pointClick / seriesClickOgeChartPointEvent<T> / OgeChartSeriesEventPointer (and keyboard Enter) activation with the normalized point payload.
legendClickOgeChartLegendClickEventCancelable — set cancel = true to veto the visibility toggle; carries willHide.
tooltipShowingOgeChartTooltipShowingEvent<T>Cancelable, before the tooltip shows for a new argument.
visualRangeChange / selectedPointsChangeOgeChartRange | null / readonly OgeChartPointRef[]The two-way model outputs.
drawnvoidAfter every render pass.

Types 14

Name Type Description
OgeChartSeriesTypestring union'line' | 'spline' | 'stepLine' | 'area' | 'splineArea' | 'stepArea' | 'stackedArea' | 'fullStackedArea' | 'stackedLine' | 'fullStackedLine' | 'stackedSplineArea' | 'fullStackedSplineArea' | 'bar' | 'stackedBar' | 'fullStackedBar' | 'rangeBar' | 'waterfall' | 'pareto' | 'histogram' | 'boxPlot' | 'scatter' | 'bubble' | 'rangeArea' | 'candlestick' | 'ohlc' | 'indicator' — plus 'radialBar' on the polar chart.
OgeChartPoint<T>interfaceThe normalized point: argument, argNumeric, value(s incl. OHLC), source, index, plus style (per-point overrides), extra (OgeChartPointExtra: box quartiles, histogram binStart/binEnd, pareto cumulative, indicator upper/lower/signal/histogram, waterfall total), outliers and the waterfall kind ('up' | 'down' | 'intermediate' | 'total').
OgeChartLabelOptions / OgeChartLabelInfo / OgeChartPointStyle / OgeChartPointInfointerfacesThe label options, what label.format receives ({ seriesIndex, seriesName, pointIndex, argument, value, percent, source, text }), what customizePoint returns and receives.
[ogeChartLabelTemplate]structural directive (OgeChartLabelTemplate)Replaces every data label of the chart (cartesian, pie and polar) — rendered in a 120 × 22 px foreignObject at the label position; context OgeChartLabelTemplateContext: { $implicit: OgeChartRenderLabel } (text, value, argument, seriesName, seriesIndex, pointIndex, inside).
OgeChartAxisType / OgeChartRange'linear' | 'logarithmic' | 'category' | 'time' / { min, max }Axis kinds and the numeric window type (time axes: epoch ms; category: index space).
OgeChartConstantLine / OgeChartAxisStrip / OgeChartAxisBreakinterfaceGuides of an axis: { value, label?, color?, dash? ('solid' | 'dash' | 'dot'), width?, position? ('inside' | 'outside') }, { start, end, label?, color? } and { start, end } (value axes only). Colours take any CSS colour, theme tokens included.
OgeChartPaneinterface{ name, height? } — a pane of panes; height is a ratio against the other panes (default 1).
OgeChartTickInterval / OgeChartDateInterval / OgeChartMinorTickOptionsnumber | interfacetickInterval: a number in axis units (ms on time axes, every n-th category on category axes) or a calendar interval { years?, months?, weeks?, days?, hours?, minutes? } stepping real calendar boundaries; minorTicks: true or { visible?, count? (4) }.
OgeChartAxisLabelOptions / OgeChartLabelFormat / OgeChartLabelOverlapinterface / union{ visible?, format?, template?, overlap? }; format is a function or Intl.NumberFormatOptions / Intl.DateTimeFormatOptions; overlap is 'rotate' | 'stagger' | 'hide' | 'skip' | 'none' — decided on measured label boxes (the chart measures each label in its own svg; a character estimate before the first render). On a rotated chart's vertical argument axis the boxes are measured by their height: a label wider than the side band wraps (up to three lines, the last ellipsized, centred on its tick), hide / skip compare the real line boxes, stagger alternates two columns and rotate falls back to skip.
OgeChartAnimationOptions / OgeChartAnimationEasinginterface / union{ enabled?, duration?, easing? } with 'linear' | 'ease' | 'easeIn' | 'easeOut' | 'easeInOut'.
OgeChartPeriod / OgeChartCustomPeriodunion / interfaceRange-selector periods: '1M' | '3M' | '6M' | 'YTD' | '1Y' | 'All', or { label, range } where range is a window { min, max }, a span in axis units back from the data end, or a calendar interval back from it.
[ogeChartTooltipTemplate]structural directive (OgeChartTooltipTemplate)Replaces the tooltip's content; context OgeChartTooltipTemplateContext: { $implicit: OgeChartPointEvent[] }.
[ogeChartAnnotationTemplate]structural directive (OgeChartAnnotationTemplate)Replaces an annotation's label (rendered in a foreignObject, so any HTML works); context OgeChartAnnotationTemplateContext: { $implicit: { text } }.
[ogeChartLegendTemplate]structural directive (OgeChartLegendTemplate)Replaces a legend item's content; context OgeChartLegendTemplateContext: { $implicit: { name, color, hidden } }.

OgePieChart

oge-pie-chart

Properties 11

Name Type DefaultDescription
dataSource / argumentField / valueFieldreadonly T[] / string | getter[] / 'argument' / 'value'One slice per item; negative values clamp to zero.
type / innerRadius / startAngle'pie' | 'doughnut' / number / number'pie' / 0.5 / 0Doughnut hole as an outer-radius fraction; start angle in radians (0 = 12 o'clock, clockwise).
smallValuesGroupingOgeChartSmallValuesGrouping | nullnull{ mode: 'topN' | 'smallValueThreshold', topCount?, threshold? } — the tail folds into an "Others" slice (othersLabel).
othersLabelstring'Others'Label (and argument of the event payload) of the grouped tail slice.
showLabelsbooleantrueOutside labels in two anti-overlap columns with connector lines (shorthand for label.visible).
labelOgeChartLabelOptions | undefined—Data labels: position 'outside' (two columns with connectors — connector: false drops the lines), 'inside'/'center' (mid-ring, contrast-picked text colour), 'insideEnd' (near the rim), 'insideBase' (near the hole); format(info) with info.percent = the slice share; showForZero; wedges too thin for text and overlapping inside labels are dropped. Default text: the argument.
colorField / customizePointfield / (info: OgeChartPointInfo) => OgeChartPointStyle—Per-slice colour from the data, or per-slice { color?, label?, description? } overrides; the legend follows, and description is spoken in the tooltip and the sr table.
seriesreadonly OgePieSeriesInput[][]Nested doughnut: one ring per entry, inner → outer ({ name?, dataSource?, argumentField?, valueField?, colorField?, customizePoint?, label? } — unset fields fall back to the chart inputs). Slices of the same argument share a colour and one legend button across rings; the sr table gets a column per ring, the tooltip prefixes the ring name, sliceClick carries ringIndex/ringName. Small-value grouping does not apply to rings.
selectedSlicesreadonly number[][]Selected slice indexes — selected slices explode. Two-way ([(selectedSlices)]).
animationboolean | OgeChartAnimationOptionstrueHover transitions plus an arc tween on data changes: slices matched by ring and argument sweep to their new angles, a new slice opens from the seam where it appears and a removed one closes onto its neighbours' seam; new data mid-tween continues from the frame on screen. { enabled?, duration? (ms, 600), easing? } as on the cartesian chart; false turns it off and prefers-reduced-motion: reduce always does.
legend / tooltipEnabled / palette / title / locale / messagessee OgeChart—Shared options with the cartesian chart.

Methods 1

Name Type Description
getSvgElement() / print(options?)SVGSVGElement / Promise<void>The live SVG root — what the image and PDF exporters serialize / opens the browser print dialog for the chart alone.

Events 2

Name Type Description
sliceClickOgeChartPieSliceEvent<T>Slice activation: argument, value, fraction, merged sources and the grouped flag for the "Others" slice.
legendClick / selectedSlicesChangeOgeChartLegendClickEvent / readonly number[]Cancelable legend toggle; the two-way selection output.

OgePolarChart

oge-polar-chart

Properties 6

Name Type DefaultDescription
dataSource / series / commonSeriesreadonly T[] / readonly OgeChartSeriesInput[] / Partial[] / [] / {}Same field mapping as the cartesian chart; supported polar types: 'line' and 'area' (closed radar loops — a null value breaks the loop into a gap), 'scatter' (markers), 'bar' (sectors from the center) and 'radialBar' (one concentric ring per category whose arc length is the value against valueAxis.max, on a track; the category labels sit at each ring's start). Series take label, colorField and customizePoint like the cartesian chart.
spiderbooleanfalseStraight-segment (polygon) grid rings instead of circles.
startAnglenumber0First category's angle in radians (0 = 12 o'clock, clockwise).
valueAxisOgeChartAxisOptions{}The radial axis: max override and labelFormat of the nice-tick rings.
selectionMode / selectedPoints'point' | 'none' / readonly OgeChartPointRef[]'none' / []Keyboard Enter on the active point selects it (a second Enter clears it); hovering markers and sectors shows the tooltip. Two-way ([(selectedPoints)]).
legend / tooltipEnabled / palette / title / locale / messagessee OgeChart—Shared options — the legend, tooltip, sr data table and keyboard inspection (arrows walk categories and series) work exactly like the cartesian chart.

Methods 1

Name Type Description
focus() / getSvgElement() / print(options?)void / SVGSVGElement / Promise<void>Focuses the keyboard-inspectable plot / the live SVG root for the image and PDF exporters / opens the browser print dialog for the chart alone.

Events 1

Name Type Description
pointClick / legendClick / selectedPointsChangeOgeChartPointEvent<T> / OgeChartLegendClickEvent / readonly OgeChartPointRef[]Point activation, the cancelable legend toggle and the two-way selection output.

OgeRangeSelector

oge-range-selector

Properties 5

Name Type DefaultDescription
dataSource / seriesreadonly T[] / readonly OgeChartSeriesInput[][] / []The mini background chart (line/area recommended) drawn behind the selection window.
valueOgeChartRange | nullnullThe selected window in argument units (null = full range). Two-way ([(value)]) — bind the same signal to a chart's [(visualRange)] and the two stay in lockstep.
scaleType'time' | 'linear' | undefined—Auto-detects from the first argument (dates → time) when unset.
periodsreadonly (OgeChartPeriod | OgeChartCustomPeriod)[][]Period buttons above the strip (a role="group" of toggle buttons with aria-pressed): '1M' | '3M' | '6M' | '1Y' count calendar months back from the data end, 'YTD' starts on January 1st, 'All' resets; custom { label, range } entries take a window, a span or a calendar interval. Calendar periods only render on time scales; the texts and accessible descriptions come from messages.periods.
palette / locale / messagessee OgeChart—Shared options; handle labels come from messages.aria.rangeStart/rangeEnd/rangeWindow.

Methods 1

Name Type Description
reset()voidBack to the full range (value = null).

Events 1

Name Type Description
valueChangeOgeChartRange | nullThe two-way model output. Interaction: drag the window (grab cursor), drag either handle, click the track to center the window there — Escape mid-drag restores; the handles are WAI-ARIA sliders (arrow keys adjust by 2%, Home/End jump to the bounds, changes announced).

OgeCircularGauge

oge-circular-gauge

Properties 12

Name Type DefaultDescription
valuenumber | nullnullThe reading; null draws the scale alone (and reads no data). Values outside the scale clamp the indicator, while aria-valuetext speaks the real value.
scaleOgeGaugeScaleOptions{}{ min?, max?, tickInterval?, minorTickInterval?, visible?, labelsVisible?, labelFormat? } — default 0..100 with 1-2-5 major ticks (about five intervals) and a fifth of that as minor ticks (0 hides them); labels thin out when they would collide.
rangesreadonly OgeChartValueRange[][]Coloured bands { start, end, color?, label? }; unset colours cycle the success / warning / danger tokens. A label is spoken with the value when it falls in the band (aria-valuetext “85, Warning”) and lists in the screen-reader table — colour is never the only channel.
barBasenumber | undefined—Where the bar indicator starts (a bar from 0 on a −50..50 scale); default the scale minimum.
subvaluesreadonly number[][]Secondary readings drawn as small markers (targets, last week).
showValuebooleantrueThe value text on the gauge.
valueFormat(value: number) => string | undefined—Value text and aria-valuetext (v => v + ' km/h'); default the locale number.
colorstring | undefined—Indicator colour — any CSS colour or token; default the accent.
indicatorOgeCircularGaugeIndicator'needle''needle', 'bar' (a filled arc from barBase) or 'marker' (a triangle on the scale). The needle and the marker rotate, the bar fills through stroke-dasharray — all three transition on value changes and sweep in from the minimum on the first render.
startAngle / endAnglenumber / number-120 / 120The arc in degrees, 0 = 12 o'clock, clockwise (-90 / 90 is a half gauge); the radius is fitted to the arc's bounding box, so partial gauges fill their box.
animationboolean | OgeChartAnimationOptionstrueThe first-render draw-in and the hover / value transitions ({ enabled, duration, easing }); prefers-reduced-motion always wins.
title / locale / messagesstring / string | undefined / Partial<OgeChartsMessages>—Shared with every chart: the heading (also the start of the accessible name), the BCP 47 locale of every number, and per-instance message overrides — the strings of these charts live in the visuals block (OgeChartsVisualMessages).

Methods 2

Name Type Description
getSvgElement() / print(options?)SVGSVGElement / Promise<void>The live SVG root — what the image and PDF exporters serialize (token colours are resolved to their computed values) / the browser print dialog for the chart alone.
refresh()voidRe-measures the container and re-reads the page direction (rarely needed — a ResizeObserver and a dir observer cover it).

Types 3

Name Type Description
OgeGaugeScaleOptions / OgeChartValueRangeinterfacesThe scale and ranges shapes, shared by both gauges and the bullet chart.
OgeCircularGaugeIndicator'needle' | 'bar' | 'marker'The circular gauge's value indicators.
role="meter"semanticsThe plot is a role="meter" with aria-valuenow (clamped into the scale), aria-valuemin, aria-valuemax and aria-valuetext; the svg is aria-hidden, and a screen-reader table outside the meter lists value, bounds, ranges and subvalues.

OgeLinearGauge

oge-linear-gauge

Properties 13

Name Type DefaultDescription
valuenumber | nullnullThe reading; null draws the scale alone (and reads no data). Values outside the scale clamp the indicator, while aria-valuetext speaks the real value.
scaleOgeGaugeScaleOptions{}{ min?, max?, tickInterval?, minorTickInterval?, visible?, labelsVisible?, labelFormat? } — default 0..100 with 1-2-5 major ticks (about five intervals) and a fifth of that as minor ticks (0 hides them); labels thin out when they would collide.
rangesreadonly OgeChartValueRange[][]Coloured bands { start, end, color?, label? }; unset colours cycle the success / warning / danger tokens. A label is spoken with the value when it falls in the band (aria-valuetext “85, Warning”) and lists in the screen-reader table — colour is never the only channel.
barBasenumber | undefined—Where the bar indicator starts (a bar from 0 on a −50..50 scale); default the scale minimum.
subvaluesreadonly number[][]Secondary readings drawn as small markers (targets, last week).
showValuebooleantrueThe value text on the gauge.
valueFormat(value: number) => string | undefined—Value text and aria-valuetext (v => v + ' km/h'); default the locale number.
colorstring | undefined—Indicator colour — any CSS colour or token; default the accent.
orientationOgeGaugeOrientation'horizontal''horizontal' or 'vertical' (minimum at the bottom; give the host a height).
indicatorOgeLinearGaugeIndicator'bar''bar' fills the track from barBase; 'marker' slides a triangle along it. Both transition and sweep in like the circular gauge.
rtlEnabledboolean | undefinedundefinedMirrored layout; unset follows the page dir (and a later flip of it). An explicit value is also set as dir on the host.
animationboolean | OgeChartAnimationOptionstrueThe first-render draw-in and the hover / value transitions ({ enabled, duration, easing }); prefers-reduced-motion always wins.
title / locale / messagesstring / string | undefined / Partial<OgeChartsMessages>—Shared with every chart: the heading (also the start of the accessible name), the BCP 47 locale of every number, and per-instance message overrides — the strings of these charts live in the visuals block (OgeChartsVisualMessages).

Methods 2

Name Type Description
getSvgElement() / print(options?)SVGSVGElement / Promise<void>The live SVG root — what the image and PDF exporters serialize (token colours are resolved to their computed values) / the browser print dialog for the chart alone.
refresh()voidRe-measures the container and re-reads the page direction (rarely needed — a ResizeObserver and a dir observer cover it).

Types 1

Name Type Description
OgeLinearGaugeIndicator / OgeGaugeOrientation'bar' | 'marker' / 'horizontal' | 'vertical'The linear gauge's indicators and orientations; the meter semantics are the circular gauge's.

OgeBulletChart

oge-bullet-chart

Properties 10

Name Type DefaultDescription
value / targetnumber | null / number | nullnull / nullThe measure (the bar, from zero) and the comparative measure (the target marker).
rangesreadonly OgeChartValueRange[][]Qualitative bands, low → high; unset colours are shades of the muted colour, darkest first (poor → good). Labels list in the screen-reader table.
scaleOgeGaugeScaleOptions{}min / max default to 0 and the nice ceiling of bands, value and target; visible: false drops the axis.
orientationOgeGaugeOrientation'horizontal'Vertical bullets stand the bar up (give the host a height).
color / targetColorstring | undefined / string | undefined—Bar and target colours; default the text colour.
valueFormat(value: number) => string | undefined—The text of every value — labels, tooltip, announcements, the screen-reader table; default the locale number.
tooltipEnabledbooleantrueHovering shows the value and the target.
rtlEnabledboolean | undefinedundefinedMirrored layout; unset follows the page dir (and a later flip of it). An explicit value is also set as dir on the host.
animationboolean | OgeChartAnimationOptionstrueThe first-render draw-in and the hover / value transitions ({ enabled, duration, easing }); prefers-reduced-motion always wins.
title / locale / messagesstring / string | undefined / Partial<OgeChartsMessages>—Shared with every chart: the heading (also the start of the accessible name), the BCP 47 locale of every number, and per-instance message overrides — the strings of these charts live in the visuals block (OgeChartsVisualMessages).

Methods 2

Name Type Description
getSvgElement() / print(options?)SVGSVGElement / Promise<void>The live SVG root — what the image and PDF exporters serialize (token colours are resolved to their computed values) / the browser print dialog for the chart alone.
refresh()voidRe-measures the container and re-reads the page direction (rarely needed — a ResizeObserver and a dir observer cover it).

Types 1

Name Type Description
role="img"semanticsThe svg's accessible name speaks title, value and target (visuals.bulletLabel); the screen-reader table lists value, target and every band.

OgeSparkline

oge-sparkline

Properties 12

Name Type DefaultDescription
dataSourcereadonly (T | number | null)[][]Plain numbers or items; null is a gap.
valueField / argumentFieldstring | getter / string | getter | undefined'value' / undefinedField mapping for items (names, dotted paths or getters); the argument only feeds the tooltip (default the 1-based position).
typeOgeSparklineType'line''line', 'area', 'bar' (bars from zero, negatives in negativeColor) or 'winloss' (equal-height ticks above / below the middle, flat for a draw).
markersboolean | OgeSparklineMarkersfalseDots on the first / last / min / max points (true = all four; max in the success colour, min in danger).
winlossThresholdnumber0Win-loss: above wins, below loses, equal draws.
minValue / maxValuenumber | undefined—A fixed value range, so sparklines of one column compare; default the data range (bars always include 0).
color / negativeColorstring | undefined—Series / positive colour (default the accent) and negative bars / losses (default danger).
lineWidthnumber1.5Line stroke width, px.
tooltipEnabledbooleanfalseA hover balloon with argument: value of the nearest point.
valueFormat(value: number) => string | undefined—The text of every value — labels, tooltip, announcements, the screen-reader table; default the locale number.
rtlEnabledboolean | undefinedundefinedMirrored layout; unset follows the page dir (and a later flip of it). An explicit value is also set as dir on the host.
title / locale / messagesstring / string | undefined / Partial<OgeChartsMessages>—The prefix of the accessible label — the svg is a role="img" summarizing the series (visuals.sparklineLabel: “Sales sparkline, 7 points: first 171, last 182, low 171, high 182”), the locale of its numbers and message overrides.

Methods 1

Name Type Description
getSvgElement()SVGSVGElementThe live SVG root, for the image exporters.

Types 1

Name Type Description
OgeSparklineType / OgeSparklineMarkers'line' | 'area' | 'bar' | 'winloss' / { first?, last?, min?, max? }Import the component from @oge-ui/charts/sparkline (also re-exported by @oge-ui/charts): that entry never loads the cartesian chart. It has no frame, no animation and no screen-reader table — a cell-sized chart speaks one summary sentence.

OgeFunnelChart

oge-funnel-chart

Properties 14

Name Type DefaultDescription
dataSource / argumentField / valueFieldreadonly T[] / string | getter / string | getter[] / 'argument' / 'value'One stage per item; negative values clamp to zero.
colorField / customizePointfield / (info: OgeChartPointInfo) => OgeChartPointStyle—Per-stage colour, or { color?, label?, description? } overrides; description is spoken with the value.
typeOgeFunnelType'funnel''funnel' or 'pyramid' (a dynamic-height triangle with the apex on top and the first stage at the base).
algorithmOgeFunnelAlgorithm'dynamicSlope''dynamicSlope': equal heights, widths follow the values. 'dynamicHeight': one fixed outline narrowing to the neck, heights follow the values.
neckWidth / neckHeightnumber / number0 / 0The neck as fractions of the width and (dynamic height) of the height.
inverted / sortData / itemGapboolean / boolean / numberfalse / true / 2Upside down; sort the stages largest first; the gap between stages, px.
showLabels / labelboolean / OgeChartLabelOptionstrue / undefinedLabels inside the stages (dropped where they do not fit, contrast-picked colour) or position: 'outside' in a column beside the shape with connectors; format(info) with info.percent = the share of the first stage. Default text stage: value.
legend / tooltipEnabledOgeChartLegendOptions / boolean{} / trueOne legend button per stage (toggles its selection, legendClick is cancelable); the tooltip adds the share of the first and of the previous stage.
palettereadonly string[] | undefined—Colours in order; default OGE_CHART_PALETTE.
valueFormat(value: number) => string | undefined—The text of every value — labels, tooltip, announcements, the screen-reader table; default the locale number.
selectedItemsreadonly number[][]Selected stage indexes (drawing order). Two-way ([(selectedItems)]).
rtlEnabledboolean | undefinedundefinedMirrored layout; unset follows the page dir (and a later flip of it). An explicit value is also set as dir on the host.
animationboolean | OgeChartAnimationOptionstrueThe first-render draw-in and the hover / value transitions ({ enabled, duration, easing }); prefers-reduced-motion always wins.
title / locale / messagesstring / string | undefined / Partial<OgeChartsMessages>—Shared with every chart: the heading (also the start of the accessible name), the BCP 47 locale of every number, and per-instance message overrides — the strings of these charts live in the visuals block (OgeChartsVisualMessages).

Methods 3

Name Type Description
focus()voidMoves the keyboard focus to the plot.
refresh()voidRe-measures the container and re-reads the page direction (rarely needed — a ResizeObserver and a dir observer cover it).
getSvgElement() / print(options?)SVGSVGElement / Promise<void>The live SVG root — what the image and PDF exporters serialize (token colours are resolved to their computed values) / the browser print dialog for the chart alone.

Events 3

Name Type Description
itemClickOgeChartFunnelItemEvent<T>Stage click or Enter: { index, argument, value, percentOfFirst, percentOfPrevious, source }.
legendClickOgeChartLegendClickEventCancelable legend toggle.
selectedItemsChangereadonly number[]The two-way selectedItems output.

Types 2

Name Type Description
Keyboardfocusable plot (role="group")Up/Down (and Left/Right, mirrored in RTL) walk the stages, Home/End jump, Enter/Space select. Each move is announced in a polite live region; the screen-reader table carries every value.
OgeFunnelType / OgeFunnelAlgorithm'funnel' | 'pyramid' / 'dynamicSlope' | 'dynamicHeight'Shapes and algorithms. The [ogeChartLegendTemplate] and [ogeChartLabelTemplate] slots of the pie chart work here too.

OgeHeatmap

oge-heatmap

Properties 12

Name Type DefaultDescription
dataSourcereadonly T[][]One item per cell; missing cells render empty and read no data.
xField / yField / valueFieldstring | getter'x' / 'y' / 'value'Column category, row category and the value.
xCategories / yCategoriesreadonly unknown[] | undefined—Explicit column / row orders (top to bottom); default the order of first appearance. Items outside them are skipped.
colorScaleOgeChartColorScale | undefined—{ type?: 'linear' | 'segmented', min?, max?, colors?, ranges?, emptyColor?, labelFormat? } — two or more colors blend evenly with color-mix() (three make a diverging scale; theme tokens follow the theme), segmented paints ranges flat. Default: the --oge-chart-heat-low / --oge-chart-heat-high tokens over the data range.
showLabelsbooleantrueValues in the cells where they fit.
valueFormat(value: number) => string | undefined—The text of every value — labels, tooltip, announcements, the screen-reader table; default the locale number.
cellGap / xAxisPositionnumber / 'top' | 'bottom'2 / 'bottom'Gap between cells, px; column labels above or below the grid.
legend / tooltipEnabledOgeChartLegendOptions / boolean{} / trueThe colour-scale legend (a gradient bar with ticks, or swatches when segmented; mirrored in RTL) and the cell tooltip.
selectedCellsreadonly OgeChartCellRef[][]Selected { row, column } cells (click / Enter toggles). Two-way ([(selectedCells)]).
rtlEnabledboolean | undefinedundefinedMirrored layout; unset follows the page dir (and a later flip of it). An explicit value is also set as dir on the host.
animationboolean | OgeChartAnimationOptionstrueThe first-render draw-in and the hover / value transitions ({ enabled, duration, easing }); prefers-reduced-motion always wins.
title / locale / messagesstring / string | undefined / Partial<OgeChartsMessages>—Shared with every chart: the heading (also the start of the accessible name), the BCP 47 locale of every number, and per-instance message overrides — the strings of these charts live in the visuals block (OgeChartsVisualMessages).

Methods 3

Name Type Description
focus()voidMoves the keyboard focus to the plot.
refresh()voidRe-measures the container and re-reads the page direction (rarely needed — a ResizeObserver and a dir observer cover it).
getSvgElement() / print(options?)SVGSVGElement / Promise<void>The live SVG root — what the image and PDF exporters serialize (token colours are resolved to their computed values) / the browser print dialog for the chart alone.

Events 2

Name Type Description
cellClickOgeChartHeatmapCellEvent<T>Cell click or Enter: { row, column, x, y, value, source }.
selectedCellsChangereadonly OgeChartCellRef[]The two-way selectedCells output.

Types 2

Name Type Description
Keyboardfocusable plot (role="group")The APG grid's navigation keys: arrows move one cell (the horizontal pair mirrors in RTL), Home/End to the row's ends, Ctrl+Home/End to the first/last cell, PageUp/PageDown to the column's ends, Enter/Space select. The screen-reader table is two-dimensional — one row per row category, one column per column category. Each move is announced in a polite live region; the screen-reader table carries every value.
OgeChartColorScale / OgeChartCellRefinterfacesThe colour scale (shared with the treemap and the map) and a selected cell.

OgeTreemap

oge-treemap

Properties 14

Name Type DefaultDescription
dataSourcereadonly T[][]Nested items (children under childrenField) or a flat list (idField + parentField; unknown parents and cycles are tolerated). Groups sum their children.
childrenField / idField / parentFieldstring | getter'items' / 'id' / undefinedSetting parentField switches to flat data.
labelField / valueField / colorFieldstring | getter'name' / 'value' / undefinedName, leaf value and an optional colour; unset colours come from the palette per top-level branch, lightened by depth.
layoutAlgorithmOgeTreemapLayoutAlgorithm'squarified''squarified' (tiles as close to squares as the data allows) or 'sliceAndDice' (strips alternating per level, input order kept).
maxDepthnumber | undefined—Levels drawn below the current root; groups that are deep enough nest their children under a header band. Unset = all.
colorScaleOgeChartColorScale | undefined—Colour the leaves by value instead (adds the colour-scale legend).
palettereadonly string[] | undefined—Colours in order; default OGE_CHART_PALETTE.
showLabelsbooleantrueName and value lines fitted to each tile (cut with an ellipsis).
valueFormat(value: number) => string | undefined—The text of every value — labels, tooltip, announcements, the screen-reader table; default the locale number.
drillDown / tooltipEnabledboolean / booleantrue / trueClicking a group (or Enter) makes it the root and shows the breadcrumb; the tooltip shows the path, value and share of the parent.
rootKeystring''The drill-down root's key ('' = the whole tree; keys are index paths like '0/2'). Two-way ([(rootKey)]).
rtlEnabledboolean | undefinedundefinedMirrored layout; unset follows the page dir (and a later flip of it). An explicit value is also set as dir on the host.
animationboolean | OgeChartAnimationOptionstrueThe first-render draw-in and the hover / value transitions ({ enabled, duration, easing }); prefers-reduced-motion always wins.
title / locale / messagesstring / string | undefined / Partial<OgeChartsMessages>—Shared with every chart: the heading (also the start of the accessible name), the BCP 47 locale of every number, and per-instance message overrides — the strings of these charts live in the visuals block (OgeChartsVisualMessages).

Methods 4

Name Type Description
drillTo(key) / drillUp()voidRe-roots on a node (announced) / one level up (no-op at the top).
focus()voidMoves the keyboard focus to the plot.
refresh()voidRe-measures the container and re-reads the page direction (rarely needed — a ResizeObserver and a dir observer cover it).
getSvgElement() / print(options?)SVGSVGElement / Promise<void>The live SVG root — what the image and PDF exporters serialize (token colours are resolved to their computed values) / the browser print dialog for the chart alone.

Events 2

Name Type Description
tileClickOgeChartHierarchyNodeEvent<T>Tile click or Enter: { key, name, value, depth, percentOfParent, isGroup, source } — fires before a group drills.
rootKeyChangestringThe two-way rootKey output.

Types 2

Name Type Description
Keyboardfocusable plot (role="group")Left/Right (mirrored in RTL) walk the siblings, Down goes to the first child, Up to the parent, Home/End to the first/last sibling, Enter/Space drill into a group (or activate a leaf) and Escape/Backspace drill up. The breadcrumb is a <nav> of buttons ending in the aria-current level. Each move is announced in a polite live region; the screen-reader table carries every value.
OgeChartHierarchyNodeEvent / OgeTreemapLayoutAlgorithminterface / string unionThe node payload (shared with the sunburst) and the tilings.

OgeSunburstChart

oge-sunburst-chart

Properties 12

Name Type DefaultDescription
dataSourcereadonly T[][]Nested items (children under childrenField) or a flat list (idField + parentField; unknown parents and cycles are tolerated). Groups sum their children.
childrenField / idField / parentFieldstring | getter'items' / 'id' / undefinedSetting parentField switches to flat data.
labelField / valueField / colorFieldstring | getter'name' / 'value' / undefinedName, leaf value and an optional colour; unset colours come from the palette per top-level branch, lightened by depth.
maxDepthnumber | undefined—Rings drawn below the current root; unset = all.
innerRadius / startAnglenumber / number0.25 / 0The centre hole as a fraction of the radius (it shows the root and goes up on click) and the start in radians (0 = 12 o'clock, clockwise, as on the pie).
palettereadonly string[] | undefined—Colours in order; default OGE_CHART_PALETTE.
showLabelsbooleantrueRadial labels where a segment is wide and deep enough.
valueFormat(value: number) => string | undefined—The text of every value — labels, tooltip, announcements, the screen-reader table; default the locale number.
drillDown / tooltipEnabledboolean / booleantrue / trueClicking a branch (or Enter) re-roots on it; the centre, the breadcrumb or Escape goes back up.
rootKeystring''The drill-down root's key ('' = the whole tree). Two-way ([(rootKey)]).
animationboolean | OgeChartAnimationOptionstrueThe first-render draw-in and the hover / value transitions ({ enabled, duration, easing }); prefers-reduced-motion always wins.
title / locale / messagesstring / string | undefined / Partial<OgeChartsMessages>—Shared with every chart: the heading (also the start of the accessible name), the BCP 47 locale of every number, and per-instance message overrides — the strings of these charts live in the visuals block (OgeChartsVisualMessages).

Methods 4

Name Type Description
drillTo(key) / drillUp()voidRe-roots on a node / one level up.
focus()voidMoves the keyboard focus to the plot.
refresh()voidRe-measures the container and re-reads the page direction (rarely needed — a ResizeObserver and a dir observer cover it).
getSvgElement() / print(options?)SVGSVGElement / Promise<void>The live SVG root — what the image and PDF exporters serialize (token colours are resolved to their computed values) / the browser print dialog for the chart alone.

Events 2

Name Type Description
segmentClickOgeChartHierarchyNodeEvent<T>Segment click or Enter (before a branch drills).
rootKeyChangestringThe two-way rootKey output.

Types 1

Name Type Description
Keyboardfocusable plot (role="group")The treemap's keys: Left/Right siblings, Down first child, Up parent, Enter drills, Escape goes up. Each move is announced in a polite live region; the screen-reader table carries every value.

OgeSankeyChart

oge-sankey-chart

Properties 11

Name Type DefaultDescription
dataSource / sourceField / targetField / valueFieldreadonly T[] / string | getter[] / 'source' / 'target' / 'value'One item per flow; nodes are derived from the link ends. Zero links and self-loops are dropped; cycles are tolerated (their back-edges ignore the columns).
nodesreadonly OgeSankeyNode[][]Optional per-node { id, label?, color? }; listing nodes also fixes their order.
nodeWidth / nodePaddingnumber / number14 / 12Node bar width and the vertical gap within a column, px.
nodeAlignOgeSankeyNodeAlign'justify'Columns from the longest path from a source: 'justify' pushes sinks to the last column, 'left' / 'right' / 'center' align by depth / height.
linkColorOgeSankeyLinkColor'source'Bands take the 'source' or 'target' node colour, or a 'neutral' grey (--oge-chart-link).
showLabels / tooltipEnabledboolean / booleantrue / trueNode labels facing the inside of the diagram; tooltips for nodes (in / out totals) and links (source → target: value).
palettereadonly string[] | undefined—Colours in order; default OGE_CHART_PALETTE.
valueFormat(value: number) => string | undefined—The text of every value — labels, tooltip, announcements, the screen-reader table; default the locale number.
rtlEnabledboolean | undefinedundefinedMirrored layout; unset follows the page dir (and a later flip of it). An explicit value is also set as dir on the host.
animationboolean | OgeChartAnimationOptionstrueThe first-render draw-in and the hover / value transitions ({ enabled, duration, easing }); prefers-reduced-motion always wins.
title / locale / messagesstring / string | undefined / Partial<OgeChartsMessages>—Shared with every chart: the heading (also the start of the accessible name), the BCP 47 locale of every number, and per-instance message overrides — the strings of these charts live in the visuals block (OgeChartsVisualMessages).

Methods 3

Name Type Description
focus()voidMoves the keyboard focus to the plot.
refresh()voidRe-measures the container and re-reads the page direction (rarely needed — a ResizeObserver and a dir observer cover it).
getSvgElement() / print(options?)SVGSVGElement / Promise<void>The live SVG root — what the image and PDF exporters serialize (token colours are resolved to their computed values) / the browser print dialog for the chart alone.

Events 2

Name Type Description
nodeClickOgeChartSankeyNodeEventNode click or Enter: { id, label, inflow, outflow }.
linkClickOgeChartSankeyLinkEvent<T>Link click: { source, target, value, item }.

Types 2

Name Type Description
Keyboardfocusable plot (role="group")Up/Down within a column, Left/Right to the neighbouring column (mirrored in RTL) at the closest rank, Home/End, Enter/Space. The active node lights up its links like a hover; the screen-reader table lists every flow. Each move is announced in a polite live region; the screen-reader table carries every value.
OgeSankeyNode / OgeSankeyNodeAlign / OgeSankeyLinkColorinterface / string unionsPer-node settings, the column alignments and the link colourings.

OgeVectorMap

oge-vector-map

Properties 12

Name Type DefaultDescription
geoJsonOgeGeoJsonFeatureCollection | nullnullAny GeoJSON FeatureCollection; Polygon and MultiPolygon features are drawn, fitted into the box. No tiles, no projection library.
projectionOgeMapProjection'mercator''mercator' or 'equirectangular'.
regionKey / nameField(feature) => string / stringundefined / 'name'A feature's join key (default feature.id, then properties.name) and the property holding its display name.
dataSource / keyField / valueFieldreadonly T[] / string | getter / string | getter[] / 'key' / 'value'The values, joined to the regions by key; regions without one read no data.
colorScaleOgeChartColorScale | undefined—The choropleth scale (see the heatmap); default the heat tokens.
showLabelsbooleantrueRegion names where the region is wide enough at the current zoom.
valueFormat(value: number) => string | undefined—The text of every value — labels, tooltip, announcements, the screen-reader table; default the locale number.
legend / tooltipEnabledOgeChartLegendOptions / boolean{} / trueThe colour-scale legend and the region tooltip.
zoomEnabled / maxZoomboolean / numbertrue / 8Wheel (a non-passive listener), pinch, the zoom buttons and the keyboard zoom; dragging pans while zoomed (the shared chart gesture machine, Escape cancels). The view is clamped so the map never leaves the box.
selectedRegionsreadonly string[][]Selected region keys (click / Enter toggles). Two-way ([(selectedRegions)]).
animationboolean | OgeChartAnimationOptionstrueThe first-render draw-in and the hover / value transitions ({ enabled, duration, easing }); prefers-reduced-motion always wins.
title / locale / messagesstring / string | undefined / Partial<OgeChartsMessages>—Shared with every chart: the heading (also the start of the accessible name), the BCP 47 locale of every number, and per-instance message overrides — the strings of these charts live in the visuals block (OgeChartsVisualMessages).

Methods 4

Name Type Description
zoomIn() / zoomOut() / resetZoom()voidZoom about the centre / back to the fitted view.
focus()voidMoves the keyboard focus to the plot.
refresh()voidRe-measures the container and re-reads the page direction (rarely needed — a ResizeObserver and a dir observer cover it).
getSvgElement() / print(options?)SVGSVGElement / Promise<void>The live SVG root — what the image and PDF exporters serialize (token colours are resolved to their computed values) / the browser print dialog for the chart alone.

Events 2

Name Type Description
regionClickOgeChartMapRegionEvent<T>Region click or Enter: { index, key, name, value, feature, source } (not fired by the click that ends a drag).
selectedRegionsChangereadonly string[]The two-way selectedRegions output.

Types 2

Name Type Description
Keyboardfocusable plot (role="group")Arrows move to the nearest region in that screen direction (by centroid) and pan it into view, + / - zoom, Shift+arrows pan, 0 resets, Home/End jump, Enter/Space select. The keys are described to screen readers (visuals.mapHint). Each move is announced in a polite live region; the screen-reader table carries every value.
OgeGeoJsonFeatureCollection / OgeGeoJsonFeature / OgeGeoJsonGeometry / OgeMapProjectioninterfaces / string unionThe minimal GeoJSON shapes the map reads and the projections.

Configuration

Properties 5

Name Type DefaultDescription
provideOgeChartsConfig(config)Provider—Configures every chart below the provider (OgeChartsConfigInput); shallow merge over OGE_DEFAULT_CHARTS_CONFIG per top-level key — a partial messages replaces whole nested blocks. The token is OGE_CHARTS_CONFIG (OgeChartsConfig).
messagesOgeChartsMessages—Every user-facing string, aria labels included: aria (OgeChartsAriaMessages — chart/pie labels with {title}/{count}, table caption, plot hint, legend label), announcements (OgeChartsAnnouncementMessages — live-region templates with {series}/{argument}/{value}), values (OgeChartsValueMessages — the words of analytic value texts: box-plot low/q1/median/q3/high/outliers, waterfall increase/decrease/intermediate/total, pareto cumulative, upper/lower/signal/histogram, the trendline suffix trend with {value}/{r2}, the histogram bin and the default indicator names sma/ema/bollinger/macd/rsi), periods (OgeChartsPeriodMessages — the range-selector period group label, button texts and their spelled-out descriptions) visuals (OgeChartsVisualMessages — the accessible names, keyboard hints, table headers, value words and announcements of the gauges, the bullet chart, the sparkline, the funnel, heatmap, treemap, sunburst, Sankey and map; count-bearing names are ICU plurals) and noData. Defaults: OGE_DEFAULT_CHARTS_MESSAGES.
localestring | undefined—BCP 47 locale for every Intl format in scope; a per-instance [locale] input wins.
a11yTableLimitnumber50Rows of the screen-reader data table.
markerThresholdnumber200Marker circles render only up to this many points per series — beyond it the single path carries the series alone. Line-family paths additionally auto-downsample with LTTB to about one point per pixel once a series outgrows the plot width (hit-testing and tooltips keep the full data).

Notes

  • Rendering is dependency-free SVG (no D3, no Chart.js, no canvas library) and dates are plain local Dates (Intl-only house rule). Time ticks are calendar-true: month boundaries land on real month starts and DST never shifts a point.
  • No WAI-ARIA APG chart pattern exists. The widget composes: role="img" with a generated label, a screen-reader-only role="table" carrying the first a11yTableLimit rows of data, real legend buttons with aria-pressed, and a focusable plot region where arrow keys walk arguments and series with polite live-region announcements — Enter selects, Escape resets the zoom.
  • The performance contract: one <path> per series regardless of point count, markers only under markerThreshold, binary-search hit-testing and rAF-coalesced pointer/resize work — verified by a 50k-point smoke test.