-
-
Couldn't load subscription status.
- Fork 1.4k
Description
Description
If on the Column Chart we use tooltips with the "shared" property turned on and apply the zoomX method to the chart, in which the first parameter is any value along the X axis higher than 1. Then, when we hover over the first column, we will see incorrect data in the tooltip: Data from the very first column of the graph will always be displayed, regardless of which column is actually the first after zooming.
Steps to Reproduce
- As a basis, I took an example from the official Apexchart website.
- We need to change the chart properties for the zoom and shared tooltips to work.
Let's add some properties.
chart: {
type: 'bar',
height: 350,
width: 350, // added
},
xaxis: {
type: 'category', // added
categories: ['Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct'],
tickPlacement: 'on', // added
tickAmount: 9, // added
},
tooltip: { // added
enabled: true,
intersect: false,
shared: true,
},- Let's apply the zoomX method to the chart.
chart.zoomX(4, 8)- Now hover your mouse over the first column of the chart to see the tooltip with incorrect data.
Expected Behavior
When hovering over the first column after zooming, display in the tooltip the data corresponding to the selected chart column.
Actual Behavior
When hovering over the first column of the chart after zooming, the tooltip always displays the data of the very first column of the chart.

