new Chart(props)
PARAMETERS
Name Type Description 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 checkedEXAMPLES
const checkedLegend = chart.getCheckedLegend()
getOptions()
Returns the currently applied chart options.
RETURNS:
{Object
} - optionsEXAMPLES
const options = chart.getOptions();
on(eventName, handler)
Register of user custom event.
PARAMETERS
Name Type Description eventName
string
Event name. 'clickLegendLabel', 'clickLegendCheckbox', 'selectSeries', 'unselectSeries', 'hoverSeries', 'unhoverSeries', 'zoom', 'resetZoom' is available.
handler
Function
Event handler
resize(size)
Resize chart size.
PARAMETERS
Name Type Description size
Object
Chart size
PROPERTIES
Name Type Description 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
Name Type Description seriesInfo
Object
Information of the series to be selected
PROPERTIES
Name Type Description 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
Name Type Description offset
Object
Offset size
PROPERTIES
Name Type Description 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();