chart.type

Configuration Structure

chart: {
type: 'line' | 'area' | ...,
}

The type option selects which kind of chart ApexCharts renders. It is the single most important chart option: each value maps to a dedicated chart type with its own behavior and plotOptions. It is part of the chart configuration.

type

Default: 'line'

Specify the chart type. Available options:

Added in 7.1.0:

Types that need an import

The default bundle (import ApexCharts from 'apexcharts', or apexcharts.min.js) draws every type above except these. Unit, waffle, sunburst, violin, waterfall, dumbbell and streamgraph left it in 8.0; icicle and raincloud were never in it. Each needs one more line:

You setBundler, next to import ApexCharts from 'apexcharts'Script tag
'unit', 'waffle'import 'apexcharts/unit'dist/unit.js
'sunburst'import 'apexcharts/sunburst'dist/sunburst.js
'icicle'import 'apexcharts/icicle'dist/icicle.js
'violin'import 'apexcharts/violin'dist/violin.js
'raincloud'import 'apexcharts/raincloud'dist/violin.js, then dist/features/raincloud.js
'waterfall'import 'apexcharts/features/waterfall'dist/features/waterfall.js
'dumbbell'import 'apexcharts/features/dumbbell'dist/features/dumbbell.js
'streamgraph'import 'apexcharts/features/streamgraph'dist/features/streamgraph.js

Or load the full bundle, import ApexCharts from 'apexcharts/full' (apexcharts.full.min.js from a script tag), which has every type. A type that is missing draws nothing, and the console names the line to add. See the tree-shaking guide for the lean core, where violin and raincloud also need apexcharts/bar.

Types that render through another type's engine

Several chart.type values are presets over a base renderer rather than renderers of their own. ApexCharts rewrites chart.type to the pathway it routes through and records what you asked for on chart.requestedType, which is read-only.

You setRenders through
'funnel', 'pyramid', 'histogram''bar'
'waterfall', 'dumbbell''rangeBar'
'streamgraph''rangeArea'
'raincloud''violin'
'gauge''radialBar'
'waffle''unit'

This matters in two places. When tree-shaking, the base type's renderer has to be in the bundle: funnel and pyramid come with apexcharts/bar, gauge with apexcharts/radialBar and waffle with apexcharts/unit, while histogram, waterfall, dumbbell, streamgraph and raincloud each have an entry of their own (apexcharts/histogram, apexcharts/waterfall and so on) that brings the renderer and the feature together. Raincloud is the exception that still needs apexcharts/bar beside it, because the violin renderer it brings draws through the bar one. And a chart.type read back off a rendered chart is the base type, not the alias.