2011-11-01 126 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 ''; 
    } 
}