1 Reply Latest reply on Apr 19, 2008 4:43 PM by jylaxx

    Charting using ActionScript and chart height,width and axis labels

    LittleMuscle Level 1
      hello, i am creating charts using action script but can't seem to do 2 things right now. 1. put labels on the axisis. 2. i can't set the height/width to 100%. does anyone know how?...below is the function i use to create the charts

      public var myChart:BarChart;
      public var series1:BarSeries;
      public var legend1:Legend;
      private function addGraph():void {

      // Create the chart object and set some
      // basic properties.
      myChart = new BarChart();
      myChart.showDataTips = true;
      myChart.dataProvider = feedRequest.lastResult.root.data;

      // Define the category axis.
      var vAxis:CategoryAxis = new CategoryAxis();
      vAxis.categoryField = yAxis;
      vAxis.dataProvider = feedRequest.lastResult.root.data;
      myChart.verticalAxis = vAxis;

      var la = new LinearAxis;

      // Add the series.
      var mySeries:Array=new Array();
      series1 = new BarSeries();
      series1.displayName = xAxis;

      myChart.series = mySeries;

      // Create a legend.
      legend1 = new Legend();
      legend1.dataProvider = myChart;

      // Attach chart and legend to the display list.