I began creating an example for you and unfortunately discovered another bug further down the chain that had to do with stacking the columns. Rather than diagnose that now, here's a great blog article I found a while back that may be a better starting point, particularly since you'll get past the other annoying flex bug that messes with the visual spacing between columns when combining lines and columns. http://flexxxed.wordpress.com/2009/05/20/using-right-chart-when-you-have\ -multiple-chart-series/ <http://flexxxed.wordpress.com/2009/05/20/using-right-chart-when-you-hav\ e-multiple-chart-series/> And just an FYI - I've run into so many bugs changing from clustered to stacked to 100% at runtime that I ultimately chose to simply have multiple charts, one of each type, that I hide/show as needed. It's a headache, but since the bugs I've logged in the Adobe bug base haven't yet been addressed, it's the best solution for us. You may be luckier depending on your needs. -Eddie B.http://www.edberman.com <www.edberman.com> ---
In [email protected], Angelo Anolin <angelo_ano...@...> wrote: > > Hi Eddie, > > Thanks for the pointers. Care to show some sample code on how I may be able to achieve extending the ColumnChart.as? I am quite new with Flex and would appreciate a lot if you could provide me some further directions to achieve this. > > Thanks a lot. > > Rgds, > > Angelo > > > > > ________________________________ > From: EddieBerman eddieberman2...@... > To: [email protected] > Sent: Sunday, 11 October, 2009 2:19:38 > Subject: [flexcoders] Re: ColumnChart & LineSeries Bug? > > > It's a flex bug. It fails in applySeriesSet( ) in ColumnChart. as. The case statement for "stacked" and "100%" assumes that the series is a column series and chokes on the line: > > seriesSet[i] .offset = 0; > > as there's no offset for lines series. You can get past this problem by extending ColumnChart. as and overriding this function, filtering for line series. > > -Eddie B. > > --- In flexcod...@yahoogro ups.com, Angelo Anolin <angelo_anolin@ ...> wrote: > > > > Hi FlexCoders, > > > > I wonder if any of you came up with this bug in ColumnChart. > > > > In my ColumnChart, I have the following MXML: > > > > <ComboBox dataProvider= "{['overlaid' ,'clustered' ,'stacked' ,'100%']} " id="stackType" selectedItem= "clustered" /> > > > > <ColumnChart id="myChart2" type="{stackType. value}" showDataTips= "true" dataProvider= "{SMITH}" height="100% " width="100%" > > > <horizontalAxis> > > <CategoryAxis categoryField= "qtr"/> > > </horizontalAxis> > > <verticalAxis > > > <LinearAxis minimum="0" maximum="3" title="YTD TRCFs"/> > > </verticalAxis> > > <series > > > <ColumnSeries dataProvider= "{SMITH}" xField="qtr" yField="lti" displayName= "SMITH"> > > </ColumnSeries> > > > > <ColumnSeries dataProvider= "{SMITH}" xField="qtr" yField="rwc" displayName= "RWC" > > > </ColumnSeries> > > > > <ColumnSeries dataProvider= "{SMITH}" xField="qtr" yField="mtc" displayName= "MTC" > > > </ColumnSeries> > > > > <!--<LineSeries dataProvider= "{SMITH}" xField="qtr" yField="target" displayName= "TARGET" > > > </LineSeries> > > > > <LineSeries dataProvider= "{SMITH}" xField="qtr" yField="ytdTRCF" displayName= "YTD TRCF"> > > </LineSeries> --> > > </series> > > </ColumnChart> > > <Legend dataProvider= "{myChart2} " direction="horizont al"/> > > > > and in my script, I have the following declaration: > > > > [Bindable] > > public var SMITH:Array = [ > > {qtr:"Jan", close:1, target:0.9, ytdTRCF:0.00, lti:0, mtc:0, rwc:0}, > > {qtr:"Feb", close:1, target:0.9, ytdTRCF:0.44, lti:1, mtc:0, rwc:1}, > > {qtr:"Mar", close:1, target:0.9, ytdTRCF:0.42, lti:1, mtc:0, rwc:0}, > > {qtr:"Apr", close:1, target:0.9, ytdTRCF:0.40, lti:1, mtc:0, rwc:0}, > > {qtr:"May", close:1, target:0.9, ytdTRCF:0.40, lti:0, mtc:1, rwc:0}, > > {qtr:"Jun", close:1, target:0.9, ytdTRCF:0.38, lti:0, mtc:1, rwc:0}, > > {qtr:"Jul", close:1, target:0.9, ytdTRCF:0.32, lti:0, mtc:0, rwc:0}, > > {qtr:"Aug", close:1, target:0.9, ytdTRCF:0.32, lti:0, mtc:1, rwc:0}, > > {qtr:"Sep", close:1, target:0.9, ytdTRCF:0.32, lti:0, mtc:2, rwc:0}, > > {qtr:"Oct", close:1, target:0.9, ytdTRCF:0.00, lti:0, mtc:0, rwc:0}, > > {qtr:"Nov", close:1, target:0.9, ytdTRCF:0.00, lti:0, mtc:0, rwc:0}, > > {qtr:"Dec", close:1, target:0.9, ytdTRCF:0.00, lti:0, mtc:0, rwc:0} > > ]; > > > > As you may notice, I have commented out the LineSeries tags for the column chart component. Doing this, my column chart renders properly (i.e., selecting the type from the combobox displays the selected column chart type properly). > > > > But when I uncomment out the Line Series, what happens is that the chart will render fine when the type is "clustered" but when I select, say the "stacked" or "100%" type, my whole application does not respond and the chart is not displayed properly. Selecting back the working type (i.e. clustered) still does not do anything. > > > > Is this a bug in Adobe Flex Column Chart? > > > > Appreciate your inputs. Thanks. > > > > Regards, > > > > Angelo > > >

