logo

/github|v4.6.1

Class

new Chart(props)

PARAMETERS
NameTypeDescription

props

Instance Methods

destroy()

Destroys the instance.

EXAMPLES
chart.destroy();

getCheckedLegend()

Get checked legend chart type and label, checked state.

RETURNS:
{

Array.<{checked: boolean, chartType: string, label: string}>

} - Array data that whether series has checked
EXAMPLES
const checkedLegend = chart.getCheckedLegend()

getOptions()

Returns the currently applied chart options.

RETURNS:
{

Object

} - options
EXAMPLES
const options = chart.getOptions();

on(eventName, handler)

Register of user custom event.

PARAMETERS
NameTypeDescription

eventName

string

Event name. 'clickLegendLabel', 'clickLegendCheckbox', 'selectSeries', 'unselectSeries', 'hoverSeries', 'unhoverSeries', 'zoom', 'resetZoom' is available.

handler

Function

Event handler

resize(size)

Resize chart size.

PARAMETERS
NameTypeDescription

size

Object

Chart size

PROPERTIES
NameTypeDescription

width

[ number ]

Width

height

[ number ]

Height

EXAMPLES
chart.resize({height: 100, width: 200});

selectSeries(seriesInfo)

Select series. It works only when the selectable option is true.

PARAMETERS
NameTypeDescription

seriesInfo

Object

Information of the series to be selected

PROPERTIES
NameTypeDescription

seriesIndex

[ number ]

Index of series

index

[ number ]

Index of data within series

name

[ string ]

Specify name for NestedPie Chart

chartType

[ string ]

Specify which chart to select when using LineArea, LineScatter, and ColumnLine charts.specifies which chart to select when using LineArea, LineScatter, and ColumnLine charts.

EXAMPLES
chart.selectSeries({index: 1, seriesIndex: 2});

setTooltipOffset(offset)

Set tooltip offset.

PARAMETERS
NameTypeDescription

offset

Object

Offset size

PROPERTIES
NameTypeDescription

x

[ number ]

Offset value to move title horizontally

y

[ number ]

Offset value to move title vertically

EXAMPLES
chart.setTooltipOffset({x: 10, y: -20});

unselectSeries()

Unselect selected series. It works only when the selectable option is true.

EXAMPLES
chart.unselectSeries();
Resizable