admin管理员组文章数量:1389920
I've been using highcharts-ng in my angularjs project. All was doing well but now I need to use some drilldowns to detail my information and it's not working using drilldown.js. I followed the example given on highcharts' drilldown tryout fiddle but it seems to don't with angular-ng. The original Highchart example doesn't work with angular-ng as you can see in my drilldown reprodution. Any ideas of what's going wrong?
Ignore this code bellow (stackoverflow wants some code in this question)
<div ng-app="myapp">
<div ng-controller="myctrl">
<highchart id="chart1" config="highchartsNG"></highchart>
</div>
</div>
I've been using highcharts-ng in my angularjs project. All was doing well but now I need to use some drilldowns to detail my information and it's not working using drilldown.js. I followed the example given on highcharts' drilldown tryout fiddle but it seems to don't with angular-ng. The original Highchart example doesn't work with angular-ng as you can see in my drilldown reprodution. Any ideas of what's going wrong?
Ignore this code bellow (stackoverflow wants some code in this question)
<div ng-app="myapp">
<div ng-controller="myctrl">
<highchart id="chart1" config="highchartsNG"></highchart>
</div>
</div>
Share
Improve this question
asked Mar 5, 2014 at 10:38
João MartinsJoão Martins
1,0462 gold badges14 silver badges37 bronze badges
2 Answers
Reset to default 4Just checked code - that plugin doesn't support drilldown module for Highcharts.
To allow drilldowns, edit sources, about ~104 line add drilldown property:
// new code:
if(config.drilldown) {
mergedOptions.drilldown = config.drilldown;
};
// old code:
if(config.title) {
mergedOptions.title = config.title;
};
if (config.subtitle) {
mergedOptions.subtitle = config.subtitle;
};
if (config.credits) {
mergedOptions.credits = config.credits;
}
The plugin use extend(defaultOptions, config.options) to override the default options. For options like 'title','subtitle', it will read the properties in your config. But for options like 'drilldown', it won't.
So, you can just change the drilldown setting into config.options to make this work,and any other setting not working you can try this way first.
本文标签: javascriptHighchartsng with drilldownStack Overflow
版权声明:本文标题:javascript - Highcharts-ng with drilldown - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744604847a2615289.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论