ChartOptions
Defined in: packages/pixi-charts/src/spec/ChartSpec.ts:140
General chart options. All fields are optional; sensible defaults are applied at the chart level.
Properties
Section titled “Properties”axisTitles?
Section titled “axisTitles?”
optionalaxisTitles?:object
Defined in: packages/pixi-charts/src/spec/ChartSpec.ts:244
Axis titles. Optional semantic labels rendered alongside each axis to
describe what the axis represents (e.g. Revenue (USD), Months). On
the x-axis the title sits below the tick labels, centered. On the
y-axis it sits to the left of the tick labels, rotated -90° so the
text reads bottom-to-top.
Setting a title adds a fixed inset to the relevant margin so the title has space to render without clipping the plot area.
Ignored for chart types without axes (pie). Validation does not warn
or error when it is set on pie specs.
optionalx?:string
optionaly?:string
colors?
Section titled “colors?”
optionalcolors?:ThemeColors
Defined in: packages/pixi-charts/src/spec/ChartSpec.ts:270
Per-color chrome overrides. Each field is independently optional; specified entries win over the ChartOptions.theme preset, while omitted entries fall through to the preset.
Use to fine-tune a single chrome color (e.g. colors: { grid: 0x404040 }
with theme: 'dark') rather than redefining the whole preset.
height?
Section titled “height?”
optionalheight?:number
Defined in: packages/pixi-charts/src/spec/ChartSpec.ts:153
Explicit canvas height in CSS pixels. Falls back to container size, then 400.
innerRadius?
Section titled “innerRadius?”
optionalinnerRadius?:number
Defined in: packages/pixi-charts/src/spec/ChartSpec.ts:179
Inner radius for pie charts, in CSS pixels. 0 (the default) renders a
true pie; any positive value renders a donut. The value is clamped at
render time to [0, outerRadius - 1] so a too-large inner radius
degrades gracefully to “almost the full disk” rather than crashing.
Like orientation, this lives on the general ChartOptions for
shape simplicity. Non-pie chart types ignore it — the validator
neither warns nor errors when it is set on them.
margin?
Section titled “margin?”
optionalmargin?:object
Defined in: packages/pixi-charts/src/spec/ChartSpec.ts:155
Plot-area inset in CSS pixels. Any subset is allowed; missing edges use chart defaults.
bottom?
Section titled “bottom?”
optionalbottom?:number
optionalleft?:number
right?
Section titled “right?”
optionalright?:number
optionaltop?:number
orientation?
Section titled “orientation?”
optionalorientation?:"horizontal"|"vertical"
Defined in: packages/pixi-charts/src/spec/ChartSpec.ts:168
Orientation of the chart. Currently only meaningful for
type: 'bar', where it controls whether bars run vertically (band
scale on the x-axis, the default) or horizontally (band scale on the
y-axis). Defaults to 'vertical' when omitted.
It lives on ChartOptions rather than a bar-specific options object so
that programmatic specs keep a single options shape and a future chart
type that wants orientation can adopt it without a schema change. Line,
area, and every other current chart type ignore this field entirely
— the validator neither warns nor errors when it is set on them.
pointAlpha?
Section titled “pointAlpha?”
optionalpointAlpha?:number
Defined in: packages/pixi-charts/src/spec/ChartSpec.ts:208
Particle alpha in [0, 1] for type: 'scatter'. When set, multiplies
the rendered alpha of the entire point cloud so overlapping points
accumulate visually into a density gradient. Default 1.
Ignored by non-scatter chart types; the validator does not warn.
pointRadius?
Section titled “pointRadius?”
optionalpointRadius?:number
Defined in: packages/pixi-charts/src/spec/ChartSpec.ts:200
Fixed point radius in CSS pixels for type: 'scatter'. When set,
overrides both the default 4px and any size encoding — every point
renders at the same radius. Useful for dense scatters where you want
small, uniformly-sized markers so density emerges from overlap rather
than per-point size variation.
Ignored by non-scatter chart types; the validator does not warn.
showAxes?
Section titled “showAxes?”
optionalshowAxes?:boolean
Defined in: packages/pixi-charts/src/spec/ChartSpec.ts:221
Whether to render axis chrome (axis line, tick marks, tick labels, and
axis title). Default: true. Set to false for sparkline embeds, hero
charts, and other decorative chart instances that should render without
axis lines or tick labels.
Gridlines are controlled separately by showGrid: with
showAxes: false and showGrid: true, only gridlines render.
Ignored for chart types that have no cartesian axes (pie). Validation
does not warn or error when it is set on pie specs.
showGrid?
Section titled “showGrid?”
optionalshowGrid?:boolean
Defined in: packages/pixi-charts/src/spec/ChartSpec.ts:230
Whether to render gridlines through the plot area. Default: true.
Independent of showAxes — you can show axes without gridlines
for a cleaner look, or gridlines without axes for a minimalist embed.
Ignored for chart types without gridlines (heatmap already renders
none; pie has no gridlines at all).
showLegend?
Section titled “showLegend?”
optionalshowLegend?:boolean
Defined in: packages/pixi-charts/src/spec/ChartSpec.ts:147
Show the legend when the chart has one. Default true. Charts with a
single series ignore this and skip the legend regardless.
showTooltip?
Section titled “showTooltip?”
optionalshowTooltip?:boolean
Defined in: packages/pixi-charts/src/spec/ChartSpec.ts:149
Show hover tooltips. Default true.
startAngle?
Section titled “startAngle?”
optionalstartAngle?:number
Defined in: packages/pixi-charts/src/spec/ChartSpec.ts:190
Starting angle of the pie sweep, in radians, using the same
screen-coordinate convention as
import(’../utils/geometry.js’).pointToAngle: 0 is 3 o’clock
and angles increase clockwise. The default is -Math.PI / 2
(12 o’clock — the most common pie-chart layout).
Ignored by non-pie chart types; the validator does not warn or error when it is set on them.
theme?
Section titled “theme?”
optionaltheme?:Theme
Defined in: packages/pixi-charts/src/spec/ChartSpec.ts:261
Named chrome theme. Sets sensible default colors for axes, tick labels,
gridlines, and legend text in one move. Default 'light' — preserves
pre-theme rendering byte-for-byte.
Affects chart chrome only; data-series colors still come from ColorEncoding.scheme regardless of theme. Per-color overrides via ChartOptions.colors win over the preset for any field they specify.
No auto-detection from CSS / DOM: pass 'dark' explicitly when
rendering on a dark background.
title?
Section titled “title?”
optionaltitle?:string
Defined in: packages/pixi-charts/src/spec/ChartSpec.ts:142
Title text. Not yet rendered. Reserved for v2.
width?
Section titled “width?”
optionalwidth?:number
Defined in: packages/pixi-charts/src/spec/ChartSpec.ts:151
Explicit canvas width in CSS pixels. Falls back to container size, then 600.