score:7
Accepted answer
Just place
var chart;
outside all functions, next to your document ready handler to make it global.
EDIT:
Also, add a reference inside the load call
load: function() {
chart = this; // `this` is the reference to the chart
requestData();
}
Source: stackoverflow.com
Related Query
- Highcharts.js will not render the chart, it says error "Cannot read property 'series' of undefined"
- HighCharts title styles i.e textDecoration property not applying when we export the chart using canvg
- Uncaught TypeError: Cannot read property '0' of undefined javascript error and with highcharts
- Highcharts Javascript - Synchronize Chart and Table not working - Cant read property cell of undefined
- I'm getting this error when fly over the chart: TypeError: Cannot read property 'lineWidth' of undefined
- Changing chart type give: Uncaught TypeError: Cannot read property 'length' of undefined Highcharts
- Cannot read property 'forExport' of undefined when leaving the page with Hicharts chart
- Highcharts Error #16: charts not showing on the same page
- error NG6001: Cannot declare 'Highchar tsChartComponent' in an NgModule as it's not a part of the current compilation
- Highcharts cannot read property 'series' of undefined
- Panning in Highcharts will not allow to go back to the max of the xAxis
- ERROR TypeError: Cannot read property '0' of undefined in angular-highcharts
- highcharts will not render to my div
- Highcharts will not render if element in series data is empty
- Uncaught TypeError: Cannot read property 'chart' of undefined in highcharts
- HighCharts Stock Chart error code 18
- c# WPF Webbrowser with Highchart, Javascript from external source not working "An error has occurred in the script on this page"
- highcharts heatmap Uncaught TypeError: Cannot read property 'prototype' of undefined
- dragging cannot get to the beginning of chart highcharts
- Using Highcharts formatter causes Cannot read property 'length' of undefined
- Highcharts error "cannot read property of undefined"
- Not able to render the charts in pdf using Wickedpdf and Highcharts in rails 2.3 app
- highcharts canvas-tools: Cannot read property 'prototype' of undefined
- Cannot read property 'type' of undefined highcharts highstock
- Highcharts Chart is not completely hidden if the smartGWT Layout id hidden
- Highcharts series doesnt show data and render the chart
- HighCharts : Tooltips exist but line is not drawn in the chart
- Highstock charts give "Uncaught TypeError: Cannot read property 'addPoint' of undefined" error
- Cannot read property 'cum' of undefined -- when creating a stacked area chart with xAxis.type=datetime
- Pie chart from highcharts does not render via justpy
More Query from same tag
- In highcharts, is it possible to make a bar in a column chart with its top bordering the edge of the chart area "on top" of the chart border?
- Highcharts-Only 1 legend value for multiple entries on a category
- Don't interpolate between missing values in Highcharts line chart?
- Get the JSON encode result from the Controller to View
- Highcharts 3D Pie Chart - angles live update
- Highchart not showing on mobile
- Access and chart through perl arrays
- Unable to set colors in Highstock charts
- dynamic threshold values in highchart - arearange
- Multiline js chart with support for irregular plot intervals
- Increment x axis value by 10 instead of 1
- PHP in Javascript for PhantomJS + Highcharts
- Populate highcharts data using MySQL
- Passivate Highcharts Export Phantom JS Web Server?
- Customizing tooltip leaving the candle stick as it is
- Grouped Scatter or Bars Chart
- Display HTML table inside a DIV using Javascript switch statement
- Show / Hide plotband in Highcharts - Javascript
- Highcharts return undefined value at a lot of data
- Get Highchart Styled Mode via npm
- Get all points in Highcharts scatter plot?
- HighChart Libraries for Android and IOS
- angular2-highcharts series highlight
- Trying to default a legend value as hidden using logi info
- Can't access custom value from point HighCharts
- Django Chart using Highcharts
- Including jquery and highcharts library
- R Highcharter: Formatting tooltip
- d3 graph freezes with highcharts
- Prevent JSON.parse(data) from cutting off zero digit for String floats