0

我有一个带有向下钻取的堆叠图表,但我设置的数据有“data,data2”,我可以改变它并执行类似的操作:http: //jsfiddle.net/FWHGx/

var data = [[
    {
        name:'Recomendación',
        y:28, 
        color: colors[0],
        drilldown: {
            name:['Recomendación','Area de Oportunidad','Observación'],
            type:'column',
            categories:['Geofísica','Geología','Petrofísica'],
            data:[[
                {name:'Txt 1',y:28, color: colors[0]},
                {name:'Txt 2',y:30, color: colors[0]}
            ]]
        }
    },
    {name:'Recomendación',y:30, color: colors[0]}
],
[
    {name:'Area de Oportunidad',y:3, color: colors[1]},
    {name:'Area de Oportunidad',y:5, color: colors[1]}
],
[
    {name:'Observación',y:1, color: colors[2]},
    {name:'Observación',y:2, color: colors[2]}
]];

而不是这个:http: //jsfiddle.net/NULTY/410/

data = [{ 
    y: 55.11}
    }, {
        y: 21.63
    }],
data2 = [{
        y: 21.63
        }, { 
    y: 55.11
    }
    }];
4

1 回答 1

0

打开控制台,并按照错误。如果您一一修复它们,您将获得正常工作的代码。例如,您缺少chart变量,或者缺少变量color(再次......)。

一些错误已修复,其余由您决定:http: //jsfiddle.net/FWHGx/2/

于 2013-04-25T11:18:09.677 回答