new ApexChart(input)
Constructor for ApexChart object. Each chart is represented by one instance.
Parameters:
| Name | Type | Description |
|---|---|---|
input |
Object | Options describing which chart to display, how it behaves etc. |
Methods
_onLegendClick(chartContext, index)
Handles legend click for the default legend behavior.
Depending on the chart type, this method either:
- Delegates to the object single-series handler.
- Toggles the visibility of the selected data point for primitive series (Pie/Donut charts).
- Toggles the visibility of the selected series for multi-series charts.
Parameters:
| Name | Type | Description |
|---|---|---|
chartContext |
Object | ApexCharts chart context. |
index |
number | Index of the clicked legend item. |
destroy()
Destroys this chart instance
refresh()
Re-renders the chart without reloading data or options.
render()
Renders the graph with available data and configuration.
update(options)
Re-renders the chart with updated options.
Parameters:
| Name | Type | Description |
|---|---|---|
options |
object | options for updating chart |