Thank you very much!  That worked as I had hoped.  How are people like
us supposed to ever figure that out on our own?  I would have never
thought to create a new ClassFactory... 

--- In [email protected], "Ely Greenfield" <[EMAIL PROTECTED]> wrote:
>
>  
>  
> on charts, itemRenderers are styles, of type IFactory.  so you want to
> do this:
>  
> import mx.charts.renderers.DiamondItemRenderer;
>  
> ...
> columnSeries.setStyle("itemRenderer",new
ClassFactory(DiamondItemRenderer));
>  
> Ely.
>  
> 
> ________________________________
> 
> From: [email protected] [mailto:[EMAIL PROTECTED] On
> Behalf Of j_sevlie
> Sent: Friday, August 25, 2006 1:00 PM
> To: [email protected]
> Subject: [flexcoders] Specifying LineSeries itemRenderer with
> Actionscript
> 
> 
> 
> I have some LineSeries charts that are generated all through
> ActionScript (because the number of lines I need is not know until
> run-time).
> 
> --- CODE START ---
> var seriesArray:Array = new Array();
> var i:int;
> var marketShareData:ArrayCollection = new ArrayCollection;
> 
> marketShareData = wsData.getMarketShare.lastResult;
> 
> for(i=0; i<marketShareData.length; i++) { 
> // Line for brand-specific data
> var columnSeries:ColumnSeries = new ColumnSeries();
> columnSeries.xField = "fiscalyear";
> columnSeries.yField = "sharepercentage";
> columnSeries.dataProvider = marketShareData.getItemAt(i);
> columnSeries.displayName =
> marketShareData.getItemAt(i).getItemAt(0).series; 
> seriesArray.push(columnSeries);
> }
> columnchartMarketShare.dataProvider = marketShareData;
> columnchartMarketShare.series = seriesArray;
> --- CODE END ---
> 
> My question is: How in the world do I specify a custom itemRenderer
> through Actionscript? With MXML you can do it like this:
> 
> <LineSeries yField="costs" 
> itemRenderer="mx.charts.renderers.DiamondItemRenderer"/>
> 
> But I'm not defining my LineSeries that way. I saw the demo of the
> charting stuff over at QuietlyScheming.com
> (http://demo.quietlyscheming.com/ChartSampler/app.html
> <http://demo.quietlyscheming.com/ChartSampler/app.html> ) but he's also
> defining the series at design-time.
> 
> Any thoughts? 
> 
> Thanks in advance for any help that somebody can provide.
> 
> Cheers,
> Jacob
>






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

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to