tooltip
Configuration Structure
tooltip: {}enabled
trueShow tooltip when user hovers over chart area.
enabledOnSeries
undefinedShow tooltip only on certain series in a multi-series chart. Provide indices of those series which you would like to be shown.
followCursor
falseFollow user's cursor position instead of putting tooltip on actual data points.
Note: This option doesn't have any effect in pie/donut/radialbar/radar/treemap/heatmap charts.
intersect
falseShow tooltip only when user hovers exactly over datapoint.
inverseOrder
falseIn multiple series, when having shared tooltip, inverse the order of series (for better comparison in stacked charts).
custom
undefinedDraw a custom html tooltip instead of the default one based on the values provided in the function arguments.
Custom Tooltip Example
tooltip: {
custom: function({series, seriesIndex, dataPointIndex, w}) {
return '<div className="arrow_box">' +
'<span>' + series[seriesIndex][dataPointIndex] + '</span>' +
'</div>'
}
}
You can even return an HTML element instead of a string
tooltip: {
custom: function({series, seriesIndex, dataPointIndex, w}) {
const customElement = document.createElement('div')
customElement.style.padding = '10px'
customElement.innerHTML = 'My custom Tooltip: ' + series[seriesIndex][dataPointIndex]
return customElement
}
}
Note: In a multi-seris/combo chart, you can pass an array of functions to customize tooltip for different chart types. For instance, a combo chart with a candlestick and a line will have different tooltips.
hideEmptySeries
falseIn multiple series, hide those series which have zero values or null data for a particular category
fillSeriesColor
falseWhen enabled, fill the tooltip background with the corresponding series color
theme
'light'Available Options
- light
- dark
If you further want to customize different background and forecolor of the tooltip, you should do it in CSS
.apexcharts-tooltip { background: #f3f3f3; color: orange; }
fontFamily
undefinedFont-family to apply on tooltip texts
fontSize
'12px'Font-size to apply on tooltip texts
onDatasetHover
highlightDataSeries
falseWhen user hovers over a datapoint of a particular series, other series will be grayed out making the current series highlight.
x
show
trueWhether to show the tooltip title (x-axis values) on tooltip or not
tooltip.x.show: true, the tooltip results in

tooltip.x.show: false, the tooltip results in

format
'dd MMM'The format of the x-axis value to show on the tooltip. To view how to format datetime Strings, view the Datetime Formatter guide.
formatter
undefinedA custom formatter function which you can override and display according to your needs (a use case can be a date formatted using complex moment.js functions)
y
In a multiple series, the tooltip.y property can accept array to target formatters of different series scales.
Example
y
To format the Y-axis values of tooltip, you can define a custom formatter function. By default, these values will be formatted according yaxis.labels.formatter function which will be overrided by this function if you define it.
tooltip: {
y: {
formatter: function(value, { series, seriesIndex, dataPointIndex, w }) {
return value
}
}
}
title
'Size: 'z
formatter
undefinedTo format the z values of a Bubble series, you can use this function.
title
'Size: 'A custom text for the z values of Bubble Series.
marker
show
trueWhether to show the color coded marker shape in front of Series Name which helps to identify series in multiple datasets.
items
display
'flex'The css property of each tooltip item container.
fixed
enabled
falseSet the tooltip to a fixed position
position
'topRight'When having a fixed tooltip, select a predefined position.
Available Options:
- topLeft
- topRight
- bottomLeft
- bottomRight
offsetX
0Sets the left offset for the tooltip container in fixed position
offsetY
0Sets the top offset for the tooltip container in fixed position