4 Replies Latest reply on Feb 12, 2010 2:23 AM by uzairseedat

    LineChart does not show x-Axis labels

    uzairseedat Level 1

      I create a LineChart using actionscript 3 and populate data values in it. The graph show lines but not any axis labels. Here is my code:

       

      ////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////

      ////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////

       

      var dp:ArrayCollection = this.provider as ArrayCollection;

       

       

      var lc:LineChart = new LineChart();

      lc.dataProvider = dp;

      lc.percentWidth = 100;

      lc.percentHeight = 100;

      lc.x = 0;

      lc.y = 0;

      lc.showDataTips =

      true;

       

       

      var cAxis:CategoryAxis = new CategoryAxis();

      cAxis.categoryField =

      "Time";

      cAxis.dataProvider = dp;

      cAxis.displayName =

      "Time";

       

       

      var lineSeries:LineSeries = new LineSeries();

      lineSeries.xField =

      "Time";

      lineSeries.yField =

      "Load";

      lineSeries.displayName =

      "Load";

      lineSeries.setStyle(

      "form", "curve");

       

       

       

      var lineChartSeries:Array = new Array();

      lineChartSeries.push(lineSeries);

       

       

      var effect:SeriesInterpolate = new SeriesInterpolate();

      effect.duration = 500;

       

      lineSeries.setStyle(

      "showDataEffect", effect);

      lc.horizontalAxis = cAxis;

       

       

       

      lc.series = lineChartSeries;

       

      mp.addChild(lc);

       

      ////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////