1 Reply Latest reply on Jul 13, 2010 10:06 AM by Bryan.Sampieri

    Losing ColumnSeries from chart

    Bryan.Sampieri

      I have a LineChart (also tried just CartesianChart) in which I start with a CandlestickSeries (stock data) and a ColumnSeries (volume data).  It has 2 axes, left (prices) and right (volume)  That displays just fine.  But then I try to add a LineSeries on top of this using AS, the volume series disappears and the right axis values change from 0-100 (basically loses the data).

       

              var sma1Series:LineSeries = new LineSeries();
              sma1Series.horizontalAxis = main.timeAxis;
              sma1Series.verticalAxis = main.leftAxis;
              sma1Series.xField = "time";
              sma1Series.yField = "sma";
              sma1Series.dataProvider = sma.data;
              sma1Series.displayName = symbol + " SMA (" + sma.period + ")";
              sma1Series.setStyle("lineStroke", styles.sma1Stroke);

       

              var series:Array = main.series // volume and candle/ohlc series
              series.push(sma1Series);
              main.series = series;

       

      All the series are still there.  Is there something I'm missing for why the ColumnSeries disappears from the chart?  The order of the series doesn't seem to matter (candlestick first, column first, line first... any order the columns get lost).

       

      Building with Flex 3.5, running in Flash Player 10.