Flex barChart and XML Data

Posted by theband on Stack Overflow See other posts from Stack Overflow or by theband
Published on 2010-04-17T15:22:34Z Indexed on 2010/04/19 8:03 UTC
Read the original article Hit count: 431

Filed under:
|
    <Projectlist>
    <Project>
    <ProjectName>Alcoswitch - ToggleSwitches
    </ProjectName>
    <ProjectStatusname>Planning</ProjectStatusname>
    </Project>
    <Project>
    <ProjectName>
    Transverse Wedge</ProjectName>
    <ProjectStatusname>Canceled</ProjectStatusname>
    </Project>
    <Project>
    <ProjectName>High Speed Pluggable I/O</ProjectName>
    <ProjectStatusname>In-Progress</ProjectStatusname>
    </Project>
    <Project>
    <ProjectName>"High Speed Pluggable I/O - Product Breakouts:</ProjectName>
    <ProjectStatusname>In-Progress</ProjectStatusname>
    </Project>
    <Project>
    <ProjectName>Circular Plastic Connector (CPC)</ProjectName>
    <ProjectStatusname>In-Progress</ProjectStatusname>
    </Project>
    </Projectlist>

This is my XML data i am recieving, how can i show this in a bar chart.

<mx:BarChart id="barChart"
             showDataTips="true" dataProvider="{ProjectStateInfo}"

             width="100%"
             height="100%">
             <mx:horizontalAxis>
                 <mx:CategoryAxis categoryField="ProjectStatusname"/>
             </mx:horizontalAxis>
        <mx:verticalAxis>
            <mx:CategoryAxis categoryField="ProjectName"/>
        </mx:verticalAxis>
        <mx:series>
            <mx:BarSeries id="barSeries" visible="true"
                    yField="ProjectName"
                    xField="ProjectStatusname"
                    displayName="ProjectStatusname"
                     />


        </mx:series>
    </mx:BarChart>

My X-Axis shows muliple values of In-Progress, but i just need one. Is it possible to represent such relationship using BarChart. Any other Flex chart is Advisable.

© Stack Overflow or respective owner

Related posts about flex

Related posts about Xml