简体   繁体   中英

Highcharts stacked columns with drilldown

I have a stacked chart with drilldown, but I set the data has "data, data2", can I change this and do something like: 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]}
]];

Instead of this: http://jsfiddle.net/NULTY/410/

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

Open console, and follow errors. If you will fix them one by one, you will get properly working code. For example you are missing chart variable, or color variable is missing (again..).

Some of errors are fixed, the rest is up to you: http://jsfiddle.net/FWHGx/2/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM