Hi, 

I wanted to apply stroke color to a column chart not using the stroke 
tag but from external css file to avoid hardcoding.... 


Is it possible? 
If so, how?? 

This is my code:

<?xml version="1.0"?> 
<!-- charts/BasicColumn.mxml --> 
<?xml version="1.0"?> 
<!-- charts/BasicColumn.mxml --> 
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml";> 
  <mx:Script><![CDATA[ 
     import mx.collections.ArrayCollection; 
     [Bindable] 
     public var expenses:ArrayCollection = new ArrayCollection([ 
        {Month:"Jan", Profit:2000, Expenses:1500}, 
        {Month:"Feb", Profit:1000, Expenses:200}, 
        {Month:"Mar", Profit:1500, Expenses:500} 
     ]); 
  ]]>

</mx:Script> 
  <mx:Panel title="Column Chart"> 
     <mx:ColumnChart id="myChart" dataProvider="{expenses}"> 
        <mx:horizontalAxis> 
           <mx:CategoryAxis 
                dataProvider="{expenses}" 
                categoryField="Month" 
           /> 
        </mx:horizontalAxis> 
        <mx:series> 
           <mx:ColumnSeries 
                xField="Month" 
                yField="Profit" 
                displayName="Profit" 
           > 
           <mx:stroke> 
                        <mx:Stroke weight="1" color="#FF0000"/> 
           </mx:stroke> 
           </mx:ColumnSeries> 
           <mx:ColumnSeries 
                xField="Month" 
                yField="Expenses" 
                displayName="Expenses" 
           > 
            <mx:stroke> 
                        <mx:Stroke weight="1" color="#0000FF"/> 
           </mx:stroke> 
           </mx:ColumnSeries> 
        </mx:series> 
     </mx:ColumnChart> 
     <mx:Legend dataProvider="{myChart}"/> 
  </mx:Panel> 
</mx:Application> 


I used the stroke tag here to apply the color..... 


I want to do same frm external CSS file. 

Thanks and Regards
 
Samata Rao
BFSI
Wipro Technologies, Pune.

 


 

Reply via email to