ChartConfig

interface ChartConfig<P extends RenderParams>

This describes the parameters for configuring and initializing a Chart.

Type parameters

  • P: RenderParams

Properties

axisType

axisType: undefined | Bottom | Top

This controls whether or not the Chart will render a horizontal axis.

debugShading

debugShading: undefined | boolean

If this is set to true, the pad and viewport will be shaded so that they are visible in the browser.

divHeight

divHeight: undefined | string | number

The height in pixels of the Chart’s containing div.

divMargin

divMargin: undefined | number

The CSS margin property for the Chart’s div.

divOutline

divOutline: undefined | string

The CSS outline property for the Chart’s div.

divOverflowX

divOverflowX: undefined | string

The CSS overflow-x setting of the Chart’s containing div.

divOverflowY

divOverflowY: undefined | string

The CSS overflow-y setting of the Chart’s containing div.

divWidth

divWidth: undefined | string | number

The width in pixels of the Chart’s containing div.

id

id: undefined | string

A unique identifier for the Chart. This will be generated automatically if one isn’t provided.

inRender

inRender: undefined | (params: P): void

The second rendering callback function.

leftPadSize

leftPadSize: undefined | number

The number of pixels of padding on the left side of the Chart.

lowerPadSize

lowerPadSize: undefined | number

The number of pixels of padding on the bottom of the Chart.

padSize

padSize: undefined | number

The number of pixels of padding around each edge of the Chart.

postRender

postRender: undefined | (params: P): void

The final rendering callback function.

postResize

postResize: undefined | (): void

The callback function that the Chart executes after resize() is called.

postZoom

postZoom: undefined | (): void

The callback function that the Chart executes after zoom() is called.

preRender

preRender: undefined | (params: P): void

The first rendering callback function.

resizable

resizable: undefined | boolean

This controls whether or not the Chart will automatically resize itself as it’s container changes size. This will cause the Chart to ignore explicit height/width arguments in the config.

rightPadSize

rightPadSize: undefined | number

The number of pixels of padding on the right side of the Chart.

rowCount

rowCount: undefined | number

The number of rows that will be rendered.

rowHeight

rowHeight: undefined | number

The height in pixels of a horizontal row in the Chart. This defaults to a value of 10.

rowStripes

rowStripes: undefined | boolean

This controls whether or not the rows will be colored in an alternating pattern.

scaleExtent

scaleExtent: undefined | None

A range of floats that constrains the zoom level.

selector

selector: undefined | string

A string that can be used to uniquely select the target DOM container.

translateExtent

translateExtent: undefined | (c: Chart <P>): None

A callback function that provides a set of ranges that constrains the horizontal translation of the Chart.

upperPadSize

upperPadSize: undefined | number

The number of pixels of padding on the top of the Chart.

zoomable

zoomable: undefined | boolean

This controls whether or not the Chart will be configured to allow zooming and panning.