3 Replies Latest reply on Apr 16, 2008 10:02 AM by sasbrw

    Creating charts in actionscript

    theNOCer
      Im trying to create charts in actionscript as the title says

      quote:



      [Bindable]private var hardData2:Array = new Array( 50, 1200, 1500, 1800, 2000 );
      [Bindable]private var hardDataX:Array = new Array( 1, 2, 3, 4, 5 );

      private function makeChart(){
      var calPanel:Panel = new Panel();
      calPanel.title = "title";
      calPanel.height = 300;
      calPanel.width = 600;

      var calLine:LineChart = new LineChart();
      calLine.dataProvider = hardDataX;
      calLine.mouseSensitivity = 50;
      calLine.width = calPanel.width-50;
      calLine.height = calPanel.height-50;

      var calSeries:Series = new Series();

      var calBaseline:LineSeries = new LineSeries();
      calBaseline.displayName = "Name One;
      calBaseline.dataProvider = hardData2;

      var calDemand:LineSeries = new LineSeries();
      calDemand.displayName = "Name Two";
      calDemand.dataProvider = hardData2;

      calSeries.addChild(calBaseline);
      calSeries.addChild(calDemand);

      calLine.addChild(calSeries);

      calPanel.addChild(calLine);

      addChild(calPanel);

      }




      so this will put the chart in the panel and the panel on the page but it wont show the lines. Anyone know whats going on with this?


      ps where is this "Attach Code" thingy?