2011-11-01 127 views
0

我找不到如何隱藏Extjs4中的軸標籤。請有人嗎?如何隱藏圖表軸標籤

謝謝。

編輯: 我需要的是擺脫x軸(x值)上的所有標籤。

+0

我剛剛加入另一場空字符串值存儲到我的數據存儲中,使用此字段作爲x軸的標籤。 – gotroch

回答

4

在軸屬性對象中使用hidden:true。

{ 
    //title: 'Size', 
    type: 'Numeric', 
    position: 'left', 
    hidden: true, // <------ 
    fields: ['sizeInBytes'], 
    minimum: 0 
} 
0

簡短的問題,簡短的回答:只需將軸title保留爲空。

+0

對不起,我必須更具體。我不是說'標題'。我需要的是去除x軸上的所有標籤(x值)。 – gotroch

0
{ 
    //title: 'Size', 
    type: 'Numeric', 
    position: 'left', 
    fields: ['sizeInBytes'], 
    minimum: 0, 
    label : { 
     return ''; 
    } 
} 
0

我想你想要做的是畫的主軸線上,但不會使標籤爲每個軸的步驟嗎?

這似乎爲我工作:

{ 
    type : "Category", 
    position : "bottom", 
    fields : ["person"], 
    title : "", 
    hidden : false, 
    drawLabel: function(){ 

     return null; 
    } 
} 

- >見drawLabel()

1

這對我的作品,但它看起來醜陋

label: { 
    renderer: function(name) { 
     return ''; 
    } 
}