2011-10-16 34 views
1

我想爲每個'x值'創建包含許多列的extjs 4列圖表。我定義2列「系列」:Extjs多列圖表

series: [ 
    { 
     type: 'column', 
     axis: 'left', 
     xField: 'key', 
     yField: ['val1'] 
    }, 
    { 
     type: 'column', 
     axis: 'left', 
     xField: 'key', 
     yField: ['val2'], 
    } 
] 

它創建的第一列(P1在screenshot)第二列,但我希望看到第二列第一附近(P2在screenshot)。我應該添加什麼參數來獲得例外圖表?

回答

3

這裏是你可以做什麼:

series: [{ 
    type: 'column', 
    xField: 'key', 
    yField: ['val1','val2']               
}] 

當您提供兩個或多個值同一系列,你得到你所期待的東西。這種類型稱爲分組條/列系列。

+0

對,完美,謝謝你! –