2011-09-01 73 views
1

如何逐个更改列图的列宽?我需要的图表所示:如何在extjs列表中逐个更改列宽?

_   __ 
| | ____ | | 
| | | | | | 
| | | | | | 
|_| |____| |__| 
+0

让我看看我是否正确理解你的问题:你希望能够单独设置你的列的宽度。但是,你想在代码中这样做,还是让用户能够自己调整列的大小? –

+0

你正在使用哪种图表工具? – Vivek

+0

我使用extjs 4.0 :) –

回答

2
... 

series: [ 
    { 
      type: 'column', 
      axis: 'left', 
      gutter: 10, 
      style: { 
        width: 50 //<-- Specify you Column width here 
      }, 
      xField: 'title',        
      yField: ['totaltodotime', 'workdone'], 
      stacked: true, 
... 
+2

我希望能够单独设置我的列的宽度。 –

0
renderer: function(sprite, record, attr, index, store) {      
         var color = selectedColor; 
         if (unique condition to identify the column) { 
          return Ext.apply(attr, { 
           fill: color, 
           width: 100,x:50,y:50 

          }); 

         } 
         else(another condition) { 
          return Ext.apply(attr, { 
           fill: color 
           ,width: 50, 

          }); 
         } 

        }, 
you can use record or index or store to identify the column being rendered