1 Reply Latest reply on Aug 19, 2010 4:17 PM by Val.Pryce

    Custom CategoryAxis Labels - not in order, not really working

    breez11 Level 1
      Getting these axis labels formatted in a !@#$%^!! Anyways I got some values to dsiplay on my verticalAxis Label, but they are out of order, it's not a range of numbers but the actual values for my columns, and also it's not based on the total of the series which display on that axis I had to define one of my datapoints in the arraycollection.


      here is an example of the chart before formatted labels
      [IMG]www.tsj4.com/p1.png[/IMG]

      here is an example of the chart after
      www.tsj4.com/p2.png

      Somehow I need to specify the group of series on that access instead of just one value in the array.

      private function createColumnChart():void {

      hAxis.categoryField = initLabel;
      c.percentWidth = 100;
      c.percentHeight = 100;
      c.showDataTips = true;

      c.dataTipFunction = dtFunc;
      c.horizontalAxis = hAxis;
      c.horizontalAxisRenderer = hAxisRenderer;
      hAxisRenderer.setStyle( "labelRotation", 45 );

      c.verticalAxis = vAxis;
      vAxis.categoryField = "p_down";
      vAxis.dataProvider = traffic;
      c.verticalAxisRenderer = vAxisRenderer;
      vAxis.labelFunction = formatLabelToLargest;

      c.secondVerticalAxis = svAxis;
      c.secondVerticalAxisRenderer = svAxisRenderer;
      svAxis.dataProvider = traffic;
      svAxis.categoryField = "offload";
      svAxis.labelFunction = decimalToPercentageLabel;

      if (traffic[0].hasOwnProperty("p_down")){
      c_series1.name = "Peer Bytes";
      c_series1.xField = initLabel;
      c_series1.yField = "p_down";
      c_series1.displayName = "Peer Bytes";
      c.series.push(c_series1);
      }

      if (traffic[0].hasOwnProperty("w_down")){
      c_series2.name = "Web Server Bytes";
      c_series2.xField = initLabel;
      c_series2.yField = "w_down";
      c_series2.displayName = "Web Server Bytes";
      c.series.push(c_series2);
      }

      if (traffic[0].hasOwnProperty("offload")){
      c_series9.dataProvider = traffic;
      c_series9.name = "Total Offload";
      c_series9.xField = initLabel;
      c_series9.yField = "offload";
      c_series9.displayName = "Total Offload";
      c_series9.setStyle( "form", "curve" );
      c.secondSeries = [ c_series9 ];
      }


      l.dataProvider = c;
      l.direction = "horizontal";

      addChild( c );
      addChild( l );

      c.dataProvider = traffic;
      }

        • 1. Re: Custom CategoryAxis Labels - not in order, not really working
          Val.Pryce

          breez11 wrote:

          Mar 26, 2008 4:50 PM
          Getting these axis labels formatted in a !@#$%^!! Anyways I gotsome values to dsiplay on my verticalAxis Label, but they are out of order, it's not a range of numbers but the actual values for my columns, and also it's not based on the total of the series which display on that axis I had to define one of my datapoints in the arraycollection.

          It's very long now, I've got the same problem, Who can give an answer? Would you pls post it here?