Mixins / foldkit-mixins-ui

ChartOptions

interface · packages/mixins-ui/src/chart.ts:80

interface ChartOptions<ParentMessage> {
  readonly id: string
  readonly label: string
  readonly description?: string | undefined
  readonly model: Model
  readonly onMessage: (message: Message) => NoInfer<ParentMessage>
  readonly format?: ((value: number) => string) | undefined
  readonly legend?: boolean | undefined
  readonly table?: 'hidden' | 'shown' | undefined
  readonly style?: NamedStyle<typeof ChartSlots> | undefined
  readonly mixins?: MixinList<ParentMessage> | undefined
}

What every kind of chart is given: its name, state, words and look.

Members

ChartOptions.id

property · packages/mixins-ui/src/chart.ts:82

readonly id: string

Prefixes the ids the chart draws, unique on the page.

ChartOptions.label

property · packages/mixins-ui/src/chart.ts:84

readonly label: string

What the chart shows: its caption, the plot's name and the table's caption.

ChartOptions.description

property · packages/mixins-ui/src/chart.ts:86

readonly description?: string | undefined

A sentence under the title, such as the period shown.

ChartOptions.model

property · packages/mixins-ui/src/chart.ts:87

readonly model: Model

ChartOptions.onMessage

property · packages/mixins-ui/src/chart.ts:88

readonly onMessage: (message: Message) => NoInfer<ParentMessage>

ChartOptions.format

property · packages/mixins-ui/src/chart.ts:90

readonly format?: ((value: number) => string) | undefined

How a value reads, on the axis and in the tooltip; default grouped digits, two decimals at most.

ChartOptions.legend

property · packages/mixins-ui/src/chart.ts:92

readonly legend?: boolean | undefined

Draws the legend; default with two series or more, and for a donut.

ChartOptions.table

property · packages/mixins-ui/src/chart.ts:94

readonly table?: 'hidden' | 'shown' | undefined

The data table: read by assistive technology only (default), or shown.

ChartOptions.style

property · packages/mixins-ui/src/chart.ts:96

readonly style?: NamedStyle<typeof ChartSlots> | undefined

A style of ChartSlots, for the look.

ChartOptions.mixins

property · packages/mixins-ui/src/chart.ts:98

readonly mixins?: MixinList<ParentMessage> | undefined

Mixins beside the style.