Skip to content

Enumerated values

Many config members take one of a fixed set of string values — renderer: 'bar', curve.type: 'monotoneX' — and each member's reference page lists its own. This page lists them by the TypeScript type they form. Every type here is exported from @mochart/core, so code that builds configs can name one in its own signature — function setRenderer(renderer: RendererType) — instead of indexing into a config type as SeriesConfig['renderer']. The few exported value constants (AUTO, TYPE_NUMBER, …) are on the API page.

This page is generated from the library source — the values from the constants each type is built from, the uses from the config type declarations — so it lists exactly what the shipped .d.ts accepts. Anchors are stable: link to any type as #TypeName.

ChartType

The chart family: cartesian ('xy') or pie.

DataType

The data type of the category axis values.

Scale

How the category axis spaces its categories.

AxisSide

Which side of the plot an axis is drawn on: the start (left or bottom) or the end.

Anchor

Where a tick label is anchored relative to its tick.

ThresholdTitleSide

Which side of a threshold line its title sits on.

Position

Whether the title or legend sits above or below the plot.

Align

Horizontal alignment.

TooltipValueAlign

Which edge of the tooltip its values are aligned to: left puts the label and value in one run of text, right floats the values to the far edge.

VerticalAlign

Vertical alignment.

RendererType

How a series draws its values.

CurveType

The interpolation curve for line and area series.

  • Values: 'linear', 'monotoneX', 'monotoneY', 'basis', 'cardinal', 'catmullRom', 'natural', 'step', 'stepBefore', 'stepAfter'
  • Used by: series.curve.type

MissingValueMode

How a line or area series treats categories with no value.

CapType

The shape of the outer end of a bar.

LabelPosition

Where a series value label sits relative to its shape.

MarkerShape

The symbol drawn at each series value.

  • Values: 'circle', 'cross', 'diamond', 'square', 'star', 'triangle', 'wye'
  • Used by: series.marker.shape

MarkerSizeScale

How marker area scales with the marker size property.

ColorMode

The keywords a series style color accepts in place of a CSS color, resolved against the palette.

ColorInterpolation

The color space a series color scale interpolates in.

PatternType

The fill pattern a patterns entry draws.

PieLabelType

What a pie slice label shows.

  • Values: 'value', 'percent', 'title', 'valuePercent', 'percentValue', 'titleValue', 'titlePercent'
  • Used by: pie.label.type

PieTooltipValueType

What a pie tooltip row shows: the slice value, its percent or both, without the series title the row already carries.

DomainChange

How an axis domain change animates relative to the value change.

AnimationEasing

How an animation's progress is paced over its duration.

  • Values: 'linear', 'sineIn', 'sineOut', 'sineInOut', 'quadIn', 'quadOut', 'quadInOut', 'cubicIn', 'cubicOut', 'cubicInOut', 'quintIn', 'quintOut', 'quintInOut', 'bounceIn', 'bounceOut', 'bounceInOut'
  • Used by: animation.easing, animation.focusEasing

Auto

The 'auto' keyword, accepted by members that otherwise take a number, a format string, or another enumeration.

Released under the MIT License.