Last active
July 22, 2019 12:36
-
-
Save SteniTK/6e63fa7710fefbdd94f0e6154003c833 to your computer and use it in GitHub Desktop.
Add Event for highchart after render
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Highcharts.addEvent(chart, 'click', (event) => { | |
let clickedData = []; | |
let dataPoint; | |
let series; | |
for (var j = 0; j < (chartInfo.chartSeriesData.length); j++) { | |
series = chart.series[j]; | |
dataPoint = series.searchPoint(event, true); | |
clickedData.push({ | |
name: series.name, | |
point: dataPoint, | |
order: series.userOptions.order, | |
impactTag: series.userOptions.impactTag, | |
intermediateSum: series.userOptions.impactTag | |
}); | |
} | |
this.clickChart(clickedData); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment