0

好吧,我有这个问题,这是我的 jsfiddle:http: //jsfiddle.net/pLDeq/1/

你能看到,当我点击一个列时,我变成了一个堆叠图表,但有时我会有 3 列、5 列等,我的问题是,是否存在检测这种情况的方法?

if (drilldown) { 
     setChart([drilldown.name, drilldown.name1, drilldown.name2, drilldown.name3, drilldown.name4, drilldown.name5],  drilldown.categories,  [drilldown.data, drilldown.data1, drilldown.data2, drilldown.data3, drilldown.data4, drilldown.data5], drilldown.color, [drilldown.type]); 
}

我还无法解决的另一件事是,为什么我无法在图例和工具提示的明细中获取名称?我可以为向下钻取格式化工具提示吗?

4

1 回答 1

1

1)从data1,data2,data3等更改为:

                data:[[
                    {name:'Recomendación',y:17},
                    {name:'Recomendación',y:20},
                    {name:'Recomendación',y:50}
                ],[
                    {name:'Area de Oportunidad',y:3},
                    {name:'Area de Oportunidad',y:0},
                    {name:'Area de Oportunidad',y:3}
                ],[
                    {name:'Observación',y:1},
                    {name:'Observación',y:1},
                    {name:'Observación',y:2}
                ]],

然后在 setChart 中使用:

setChart([drilldown.name, drilldown.name1, drilldown.name2, drilldown.name3, drilldown.name4, drilldown.name5],  drilldown.categories,  drilldown.data, drilldown.color, [drilldown.type]); 

2)对名字做同样的事情。

于 2013-04-16T10:36:21.430 回答