Skip to content

Commit

Permalink
fix(Highcharts plugin): fix getTooltip in case of tooltip fixation (#…
Browse files Browse the repository at this point in the history
…496)

fix(Highcharts plugin): fix getTooltip in case of tooltip fixation
  • Loading branch information
korvin89 authored Jun 28, 2024
1 parent f633d91 commit 3c40fd9
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion src/plugins/highcharts/renderer/helpers/config/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -485,8 +485,21 @@ function validateCellManipulationConfig(tooltipOptions, property, item) {
}
}

function getSeriesTypeFromTooltipContext() {
if (this.series) {
return this.series.type;
}

if (Array.isArray(this.points)) {
return this.points[0]?.series?.type;
}

return '';
}

function getTooltip(tooltip, options, comments, holidays) {
const serieType = (this.series && this.series.type) || tooltip.chart.options.chart.type;
const serieType =
getSeriesTypeFromTooltipContext.call(this) || tooltip.chart.options.chart.type;
const chart = tooltip.chart;
const xAxis = chart.xAxis[0];
const isDatetimeXAxis = xAxis.options.type === 'datetime';
Expand Down

0 comments on commit 3c40fd9

Please sign in to comment.