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 [email protected], Angelo Anolin <angelo_ano...@...> 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="horizontal"/> > > 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 >

