0

I need to be able to update the chart title and size when drilled down.

The drilldown function runs but the following code does nothing at all.

 // This gets called correctly, alert gets hit but does not change the title
 drilldown: function() {
                    alert('drilldown');

                    $scope.highchartsNG.title.text = 'New Title Test (drilldown)';
                }

    // This gets called at start and changes the title
    func: function (chart) {
        //setup some logic for the chart
        //alert('func');
        $scope.highchartsNG.title.text = 'New Title Test (func)';
    }

jsfiddle located at the following http://jsfiddle.net/vgmhgs0e/2/. The actual drilldown does not work in this example but I have it working, I think that's because it doesn't have the code from this thread: Highcharts-ng with drilldown

Community
  • 1
  • 1
user2158259
  • 137
  • 2
  • 11
  • Any errors in the console? I can see `$watch`'es for size and title, to it should work. In the jsFiddle you are using `highchartsNG`, and in the code above `chartConfig` - maybe that's the problem? – Paweł Fus May 29 '15 at 13:50
  • The name can be anything I want. That shouldn't be the issue, I noticed my jsfiddle was not correct, didn't save correctly and I have updated the link. http://jsfiddle.net/vgmhgs0e/2/ – user2158259 May 29 '15 at 15:41
  • I found something. In the drilldown I added a $scope.$apply(); after I run the $scope.highchartsNG.title.text = "New Title Test (drilldown)'; That doesn't seem like a good programming practice but a good hack... – user2158259 May 29 '15 at 17:31

0 Answers0