Mixins / foldkit-mixins-ui

ChartFrame

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

interface ChartFrame<Message> {
  readonly h: HtmlBuilder<Message>
  readonly builders: SlotBuilders<typeof ChartSlots, Message>
  readonly format: (value: number) => string
  readonly point: Option.Option<number>
  readonly points: ReadonlyArray<ChartPoint>
  readonly legend: ReadonlyArray<Html>
  readonly plot: SlotAttributes<Message>
  readonly pointer: (at: number) => Attribute<Message>
}

What a kind is given to draw with: the chart's state, words and parts.

In the guides

Members

ChartFrame.h

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

readonly h: HtmlBuilder<Message>

ChartFrame.builders

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

readonly builders: SlotBuilders<typeof ChartSlots, Message>

ChartFrame.format

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

readonly format: (value: number) => string

How a value reads: the chart's format.

ChartFrame.point

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

readonly point: Option.Option<number>

The point lit, if it is a point of the data.

ChartFrame.points

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

readonly points: ReadonlyArray<ChartPoint>

ChartFrame.legend

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

readonly legend: ReadonlyArray<Html>

The legend, drawn where the kind puts it (empty when none is shown).

ChartFrame.plot

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

readonly plot: SlotAttributes<Message>

The plot's attributes: the focus, the keys, and the pointer leaving.

ChartFrame.pointer

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

readonly pointer: (at: number) => Attribute<Message>

The attribute that lights point at while the pointer is over the element.