2016-12-20 34 views
0

我使用x,y位置的项目来显示图表的子标题。 但酒吧的高度已经超过研究标题如何设置默认的最大酒吧高度在这里何在ext js柱形图中设置最大条形图高度?

+0

你可以请显示一些代码。检查此链接,您可以使用bar高度:http://docs.sencha.com/extjs/5.1.2/api/Ext.chart.series.Bar.html – UDID

+0

iam使用ext js 4.2.0 { \t type: '文本', \t文字: “chartTitle”,//显示标题 \t字体: '15像素黑体', \t宽度:300, \t高度:20, \t X:35,//子画面x位置 \t y:10 //精灵y的位置 \t}我的酒吧高度与此标题重叠 –

+0

renderer:函数(精灵,记录,attr,索引,存储) \t \t \t \t { \t \t \t \t \t如果(attr.height> = 27) \t \t \t \t \t { \t \t \t \t \t attr.height = attr.height-27; \t \t \t \t \t attr.y = attr.y + 27; \t \t \t \t \t} \t \t \t \t \t}通过使用此代码我们可以设置栏的最大高度是正确的??? –

回答

0
renderer: function(sprite, record, attr, index, store) 
{ 
if(attr.height>=27) 
     { 
     attr.height=attr.height-27; 
     attr.y=attr.y+27; 
     } 
} 
//By using this code we can set maximum height of bar is it correct