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 | string | 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.

domainConstraint

domainConstraint: undefined | (chart: Chart <P>): None

This constrains the Chart’s domain, which in turn constrains both zoom level and panning. The parameter is a callback function that is evaluated after each zoom event to produce an interval that constrains the domain.

draw

draw: undefined | (params: P): void

The rendering callback that should be responsible for drawing glyphs with the rendering API.

id

id: undefined | string

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

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 callback function that the Chart executes after render() is called.

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.

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.

rowColors

rowColors: undefined | string []

A list of colors that will color the Chart’s rows in a repeating pattern.

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.

rowOpacity

rowOpacity: undefined | number

The opacity of the colored row stripes.

selector

selector: string

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

updateDimensions

updateDimensions: undefined | (params: P): void

The rendering callback function that should be responsible for updating the Chart’s DOM element dimensions.

updateDomain

updateDomain: undefined | (params: P): void

The rendering callback function that should be responsible for updating the domain of the Chart.xScale property.

updateLayout

updateLayout: undefined | (params: P): void

The rendering callback function that should be responsible for updating the Chart.layout property.

updateRowCount

updateRowCount: undefined | (params: P): void

The rendering callback function that should be responsible for updating the Chart.rowCount property.

upperPadSize

upperPadSize: undefined | number

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

zoomConstraint

zoomConstraint: undefined | None

A Chart’s contents are scaled by a scaling factor k. If a zoomConstraint of the form [min_k, max_k] is provided, the scaling factor will be constrained to that interval. This will not constrain panning.

zoomable

zoomable: undefined | boolean

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