Am using HighChartsNG in Angular. I want to explicitly render my chart in a given Div, so I use the options.chart.renderTo = 'divId', but that doesn't seems to be working
html:
<div ng-app="myapp">
<div ng-controller="myctrl">
<div>top</div>
<hr/>
<div id="middle">middle</div>
<hr/>
<div>bottom</div>
<hr/>
<highchart id="chart1" config="highchartsNG"></highchart>
</div>
</div>
JS
var myapp = angular.module('myapp', ["highcharts-ng"]);
myapp.controller('myctrl', function ($scope) {
$scope.highchartsNG = {
options: {
chart: {
type: 'bar',
renderTo: 'middle'
}
},
series: [{
data: [10, 15, 12, 8, 7]
}],
title: {
text: 'Hello'
},
loading: false
}
});
In the example above, am trying to render the chart explicitly to 'middle' div, but that does not seems to be happening. What am I doing wrong?