0 Replies Latest reply on Feb 27, 2012 3:11 AM by srd_1111

    Charting : LinearAxis not rendering properly in Flex 4.6




      I am converting an application from Flex 3.5 to Flex 4.6 and I am having some trouble with charts. It seems that in Flex 4.6, the horizontal axis of the BarChart takes all of the space given to the chart, whereas in Flex 3.5, axis length is computed in order to make labels fit in the allowed space.


      In order to show the problem, I have dont two test projects (one uses Flex 3.6A, the other one uses Flex 4.6). These two projects are simple BarCharts with one BarSeries and an ArrayCollection of 4 values binded to them. Of course, the values are the same in the two projects.


      I've pasted screenshots of the two projects in the image below, and added with a photo editing software a red line showing where the chart should stop.


      above : Flex 4.6, horizontal axis stuck to the right, axis label gets out of the space allocated for the chart.

      under : Flex 3.5, axis length is computed the way I want.




      I've looked on forums and also in the 'Flex Bug and Issue Management System' but found nothing.


      I have devised a workaraound by manually setting the 'gutterRight' property of the chart, but it is not satisfying because it should be computed according to last label width. I also would appreciate something 'cleaner' that that.


      Does anybody knows if this is a Flex bug ? Are there any workaraounds ? Is it a BarChart property/style that has to be set ?


      Your help is very much appreciated.