Greetings -

Having a hard time getting a very simple column chart working, code 
below. Category labels on the x axis render, as do numeric labels on 
the y axis.  But none of the data, ie columns renders. If I change 
LinearAxis to CategoryAxis with dataProvider="{dashboardAC}", the 
data does render,  but the values (against the y axis), are not 
sorted numerically, rather they follwo the order in the array, ie  
5000, 10000, 2000, 17000.

Thoughts?

Also, is there a way to prevent a row in the array (Total in this 
case) from dispalying, ie I only want columsn for the indvidual 
cateogory values, not the total.

thanks, ethan



<!-- Purchase Data -->
<mx:ArrayCollection id="dashboardAC">
      <mx:source>
            <mx:Object segment="Back Sleeper" mailed="25,000" purchased="5,000" 
rate="20%"/>
            <mx:Object segment="Side Sleeper" mailed="50,000" 
purchased="10,000" rate="20%"/>
            <mx:Object segment="Stomach Sleeper" mailed="10,000" 
purchased="2,000" rate="20%"/>
            <mx:Object segment="Total" mailed="85,000" purchased="17,000" 
rate="20%"/>
      </mx:source>
</mx:ArrayCollection>


<mx:ColumnChart id="columnchart1" width="100%" height="256" 
dataProvider="{dashboardAC}">
      <mx:horizontalAxis>
            <mx:CategoryAxis dataProvider="{dashboardAC}" 
categoryField="segment"/>
      </mx:horizontalAxis>
      <mx:verticalAxis>
            <mx:LinearAxis maximum="18000" minimum="0"/>
      </mx:verticalAxis>                      
      <mx:series>
            <mx:ColumnSeries displayName="Series 1" xField="segment" 
yField="purchased"/>
      </mx:series>
</mx:ColumnChart>






--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com




SPONSORED LINKS
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS




Reply via email to