Skip to content

ChartEncoding

Defined in: packages/pixi-charts/src/spec/ChartSpec.ts:89

Channel-to-field mapping for a chart.

Each chart type uses a different subset:

  • Line / area / bar: x + y (+ optional color for series split).
  • Scatter: x + y (+ optional color, size).
  • Pie: value (+ optional color).
  • Heatmap: x + y + value (+ optional color).

Only the encodings relevant to a given chart are required — see import(’./validate.js’).validateChartSpec for the per-type rules.

optional color?: ColorEncoding

Defined in: packages/pixi-charts/src/spec/ChartSpec.ts:95

Color channel (categorical series split).


optional size?: object

Defined in: packages/pixi-charts/src/spec/ChartSpec.ts:100

Size channel — scatter only. The field’s values drive a square-root radius scale (area ∝ value). Ignored by line/area/bar.

field: string


optional value?: object

Defined in: packages/pixi-charts/src/spec/ChartSpec.ts:107

Value channel — used by pie (the numeric value each slice represents, proportionally summed to the full circle) and reserved for heatmap’s cell value. The field is interpreted as quantitative; missing or non-finite values are skipped with a console warning.

field: string


optional x?: EncodingField

Defined in: packages/pixi-charts/src/spec/ChartSpec.ts:91

Positional x-axis encoding.


optional y?: EncodingField

Defined in: packages/pixi-charts/src/spec/ChartSpec.ts:93

Positional y-axis encoding.