IChartBaseProps

interface
Chart

Props shared across every origam chart type — extends ICommonsComponentProps, IDimensionProps, IMarginProps, IPaddingProps, IRoundedProps, IElevationProps and IBgColorProps. Covers series data, legend, tooltip, animation, color scheme and aspect ratio.

TypeScript

Definition

The TypeScript interface definition as found in the origam source. Click the copy icon to copy the snippet.

typescript

Inheritance

Extends

Parent interfaces this one inherits from. Their properties are available on every consumer of this interface.

API

Properties

Every property declared by this interface, with its type, optionality and default.

series
required
Array<IChartSeries>
Data series — one or more. An empty array renders the #empty slot.
categories
Array<string>
X axis labels (for line/area/bar/column/radar). Length should match the longest series; missing entries fall back to the numeric index. Ignored for pie/donut/scatter.
title
string
Optional title rendered above the plotting area.
subtitle
string
Optional subtitle rendered below the title.
showLegend
boolean
Toggle the legend block. Default true.
legendPosition
TChartLegendPosition
Anchor of the legend block. Default bottom.
showTooltip
boolean
Toggle the hover tooltip. Default true.
animated
boolean
Animate paths/bars/slices on first paint and on data changes. Respects prefers-reduced-motion. Default true.
animationDuration
number
Animation duration in ms. Default 600.
colorScheme
Array<TIntent | string>
Palette used when a series does not pin its own color. Accepts intent strings or raw CSS colours. Default cycles through the 8 origam intents.
aspectRatio
string
CSS aspect-ratio shortcut ('16/9', '4/3', '1/1'). When set, overrides height and lets the chart breathe with the container width.

Ecosystem

Used by

Components and composables that extend or consume this interface.

Usage

Examples

Ready-to-paste code snippets using this interface.

Bar chart using the shared base props

vue