Highcharts-ng与向下钻取 [英] Highcharts-ng with drilldown

查看:133
本文介绍了Highcharts-ng与向下钻取的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的angularjs项目中使用了highcharts-ng。一切进展顺利,但现在我需要使用一些深入细节来详细说明我的信息,而不是使用drilldown.js。我遵循了highchart中的深入试用小提琴的例子,但是它似乎没有使用angular-ng。
原始 Highchart示例不支持angular-ng,正如您在中所见。深入重现
有什么错误的想法吗?

忽略这段代码(stackoverflow在这个问题中需要一些代码)

 < div ng-app =myapp> 
< div ng-controller =myctrl>
< highchart id =chart1config =highchartsNG>< / highchart>
< / div>
< / div>


解决方案

刚刚检查过的代码 - 该插件不支持向下钻取



允许钻取,编辑资源,约〜104行添加钻取属性:



<$ p $如果(config.drilldown){
mergedOptions.drilldown = config.drilldown;
};
//旧代码:
if(config.title){
mergedOptions.title = config.title;
};
if(config.subtitle){
mergedOptions.subtitle = config.subtitle;
};
if(config.credits){
mergedOptions.credits = config.credits;
}


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>

解决方案

Just 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;
  }

这篇关于Highcharts-ng与向下钻取的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆