Monday, June 28, 2010

Column or Bar Chart Item Width

Flex has Column and Bar charts which visualizes data in rectangular shapes.
To change the width of items flex provides two styles.
For column chart those are "columnWidthRatio" and "maxColumnWidth" of Number type.

columnWidthRatio specifies a ratio of wide to draw the columns relative to the category width,
as a percentage in the range of 0 to 1.
A value of 1 uses the entire space. The default value is 0.65.

maxColumnWidth specifies how wide to draw the columns, in pixels.

The actual column width used is the smaller of these two properties
Clustered columns divide this space proportionally among the columns in each cluster.

As width of the item depends on smaller of the two I kept one property constant and assigned the maximum value.
i.e. columnWidthRatio=1; Now one can assign any Number to the maxColumnWidth according to the requirement.

For Bar chart the styles are "barwidthRatio" and "maxBarWidth".



1 comment:

  1. Great article...
    Its nice to get such rare information...
    We want more of such information...

    ReplyDelete

Add your Thoughts...