1 Reply Latest reply on Apr 27, 2012 11:02 AM by fsoender

    Problem with chart width

    archemedia Level 4

      Hi all,

       

      I have a problem with a chart.

       

      I show a columnChart at 100% width.

      The dataprovider is hierarchic. So every object in it has a 'children' property which is a new ArrayCollections.

      This way, I'm able to descend in the hierarchy by scripting this:

       

      targetChart.dataProvider = myClickedItem.children;

       

      All works perfect except that the larger the dataset is, the narrower my chart displays.

       

      This is what it looks like (from left to right, the several levels of the chart):

       

      chart.jpg

       

      This is the mxml code I use:

       

      <mx:ColumnChart id="targetChart" width="100%" height="100%"

                                                        dataProvider="{targetProvider}" showDataTips="true"

                                                        itemClick="targetChart_itemClickHandler(event)"

                                                        type="{statStyle}">

       

        <mx:horizontalAxis>

                                         <mx:CategoryAxis categoryField="label"/>

        </mx:horizontalAxis>

       

        <mx:series>

                                    <mx:ColumnSeries yField="total" width="100%"

                                                                             fillFunction="getTotalFill"

                                                                             displayName="Totaal ovsg"

                                                                             showEffect="zoom" hideEffect="zoom"/>

                                    <mx:ColumnSeries yField="count" width="100%"

                                                                             fill="{Config.CHART_COLOR_ARRAY.getItemAt(0) as IFill}"

                                                                             displayName="Telling"

                                                                             showEffect="zoom" hideEffect="zoom"/>

        </mx:series>

        </mx:ColumnChart>

       

      Any help would be appreciated.

       

      Dany