score:1
Accepted answer
The this
keyword in onclick callback function refers to a chart, use arrow function to get the external this
reference:
buttons: {
contextButton: {
menuItems: [..., {
textKey: 'downloadCSV',
onclick: () => {
if (this.downloadCsvRoute && this.downloadCsvRoute != '') {
axios.get(this.downloadCsvRoute)
}
}
}]
}
}
API Reference: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions
Source: stackoverflow.com
Related Query
- Highcharts pass external variable to global options
- Highcharts - Global configuration with common code and unique data & Headings
- Pass JSON-encoded PHP Variable to HighCharts
- Is there a way to pass in variable element ID from Highcharts to launch a modal window?
- highcharts pass variable from plotline
- Highcharts not working when pass the javascript variable as hightcharts series data
- How to pass dynamic options (function()) to Highcharts from JSON?
- pass global variable into jquery function
- Using a flask variable as data source for highcharts
- Cannot modify highcharts initilized as a global variable
- Pass php variable in bar graph with highcharts
- How to pass series to plot options in highcharts
- I cannot pass in a variable into the highcharts function using jquery and pug.
- Plotting Global variable Highcharts
- highcharts pass multiple values to tooltip
- Highcharts / jQuery - destroy and rebuild chart with original options
- Disable PDF and SVG download options in Highcharts
- Highcharts how to change x axis options
- How to pass json data to highcharts series?
- Highcharts how to use JavaScript variable as series data source?
- Highcharts and phantomjs error. Can't find variable Highcharts
- How to pass custom data into Highcharts graph click event
- Highcharts -- exporting, setting dataLabel options
- Pass Data String as parameter to a Function for HighCharts
- Highcharts - add additional export options without losing default ones
- Creating a line graph with highcharts and data in an external csv
- Using PhantomJS to create HighCharts grahps server side for use in PDF creation (PHP) - results in exit code 11 from PHPs exec();
- Angular Highcharts - How to enable noData options and update it dynamically
- Highcharts scatter plot with variable line width
- How do I configure the options in Highcharts to allow multiple drilldowns asynchronously?
More Query from same tag
- Highcharts tooltip not showing on unsort data
- how to remove the base line on the yaxis of highcharts?
- How To Reject An Element From An Array?
- JS HighCharts.js Pie data undefined error in code
- highchart change chart by choosing month in drop down
- Highstock X axis (date-value) render incorrectly
- Highmap R (or) javascript - adding custom legend
- Convert Highchart to multiple y axis
- Highcharts: Align two Y-Axis with different values
- Highcharts - Segmented column bar
- highchart Axis values color
- Highcharts - how to align two charts on a same line
- high chart sample
- Highcharts - Diagonal line X/Y axis
- Dynamically create highcharts with bootstrap carousel
- In highchart how to show y axis values in reverse order
- highcharts exported image options
- Highcharts in InfoWindow on Google Maps
- Exclude "H:m"in dateTimeLabel Highcharts
- highgraphs chart not rendering
- Highcharts version 7.1.1 how to offline-exporting PDF with amd modules
- HighCharts Dynamically add flags
- How To Call A Function To Make A Graph Using HighCharts in PHP
- How to use a different formatter on Highcharts in each curve of the same graphic?
- Highcharts Map bubble on Pacific Centered World map
- Chrome won't display the x-axis labels in Highcharts, Safari and Firefox do it
- Highcharts - Issue with negative values when displaying multiple axes
- Highcharts - PDF export format issues. Font sizes etc
- Highcharts dynamic data fetching in React
- HighChart pointPlacement on y-axis