Highcharts饼图钻取没有显示在第三次演习 [英] Highcharts Pie Chart Drilldown not showing on third drill

查看:95
本文介绍了Highcharts饼图钻取没有显示在第三次演习的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有两个问题:第三个钻取数据标签的名称显示为切片而不是它们各自的名称。这是一个错误还是我需要指定它?

  • 当我应用颜色主题时,每次向下钻取颜色重置并随机生成其他颜色。 (我在主题文件系列中有20种颜色)

  • 是否还有一种钻取方法? IE有一个外部按钮或控件,允许用户恢复一个级别?对于我来说,我不知道是否直观地再次回到原始和深入。

    这是我的JSFiddle。
    http://jsfiddle.net/Lzhm6/



    除了这些问题之外,我的一切都很好,希望能够帮助其他人尝试做同样的事情。



    *另请注意我正在使用新的源代码:https://raw.github.com/highslide-software/highcharts.com/master/ js / highcharts.src.js ,它修复了标签错误。



    *每次钻取时我都会收到一个错误:

      point.select不是函数
    [Break On This Error] point.select(null,event.ctrlKey || event.metaKey || event .shiftKey);


    解决方案

    我玩了第一个A数据部分,它为此:

      data:[{
    y:33.06,
    name:'A',
    钻取:{
    name:'Budweiser',
    data:[
    {name:'A',y:10838}
    ,{name:'B', y:11349}
    ,{name:'C',y:11894}
    ,{name:'D',y:11846}
    ,{name:'E',y: 11878}
    ,{name:'F',y:11662}
    ,{name:'G',y:11652}
    ],
    color:colors [0]
    }},

    这对我来说非常合适。我将类别和数据节点拖放到数据数组中的单个名称/数据对象节点数组中。查看更新后的 jsfiddle ,查看更改是如何进行的。


    1. 点击A-1

    2. 点击A


    I have two issues:

    1. The third drilldown the names of the DataLabels appear as "Slice" instead of their respective names. Is this a bug or do I need to specify it somewhere?
    2. When I apply a color theme, every drilldown the colors reset and just randomly generate other colors. (I have 20 colors in the series for the theme file)
    3. Is there also a way to drill back up? IE have an external button or control that allows user to go back up a level? For me I dont know if it is intuitive to go back to the original and drilldown again.

    Here is my JSFiddle. http://jsfiddle.net/Lzhm6/

    I have everything working great except these issues and hopefully can help others trying to do the same thing.

    *Also note I am using the new source code: https://raw.github.com/highslide-software/highcharts.com/master/js/highcharts.src.js which fixes the label errors.

    *I am getting an error everytime I drilldown:

    point.select is not a function
    [Break On This Error] point.select(null, event.ctrlKey || event.metaKey || event.shiftKey);
    

    解决方案

    I played with the first A data section, and changed it to this:

                data: [{
                    y: 33.06,
                    name: 'A',
                    drilldown: {
                        name: 'Budweiser',
                        data: [
                            {name:'A', y:10838}
                            , {name:'B', y:11349}
                            , {name:'C', y:11894}
                            , {name:'D', y:11846}
                            , {name:'E', y:11878}
                            , {name:'F', y:11662}
                            , {name:'G', y:11652}
                        ],
                        color: colors[0]
                    }},
    

    This is working perfectly for me. I pulled the categories and data nodes into a single array of name/data object nodes in the data array. Check the updated jsfiddle to see how the changes worked.

    1. Click A-1
    2. Click A

    这篇关于Highcharts饼图钻取没有显示在第三次演习的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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