After setting up the chart's configuration in my controller, I am facing an issue. The HighCharts-ng (an angularJS directive for HighCharts) has a method that I want to implement:
$scope.ohlcChartConfig = {
options: {.......
I need to achieve something similar to this line of code:
var chart = $('#container').highcharts();
This will allow me to utilize the following methods within highcharts-ng:
var svg = chart.getSVG();
chart.xAxis[0].addPlotBand({...})
chart.xAxis[0].removePlotBand('plot-id');
So far, I have attempted the following approach:
var chart= $scope.ohlcChartConfig;
Unfortunately, when trying to execute the methods, I encounter the error 'undefined is not a function'.
You can view a simplified version of the issue on this JSFiddle.
Thank you for any assistance provided.