2013-04-24 117 views
0

我有明細堆疊的圖表,但我設置的數據有「數據,數據2」,我可以改變這一點,這樣做:http://jsfiddle.net/FWHGx/Highcharts堆疊列有明細

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

回答

0

打開控制檯,並按照錯誤。如果你會一一解決,你會得到正確的工作代碼。例如,您缺少變量chart,或者color變量缺失(再次..)。

一些錯誤是固定的,其餘的由您決定:http://jsfiddle.net/FWHGx/2/