1 Reply Latest reply on Jun 3, 2009 1:05 PM by Peter deHaan

    Exception in Cartesian Chat with Flex 4

    Hironmay Level 4

      Hi ,

       

      When I was trying to port my old flex3 chart components in flex 4 project, I keep  hitting the exception in the function updateMultipleAxesStyles in CartesianChart.as because horizontalAxisStyleNames are not defined. Is there a way to by pass this or is this a bug ?

       

        private function updateMultipleAxesStyles():void
          {
              var hsNames:Array /* of String */ = getStyle("horizontalAxisStyleNames");
              var vsNames:Array /* of String */ = getStyle("verticalAxisStyleNames");
             
              var n:uint = _horizontalAxisRenderers.length;
             
              var hslen:uint = hsNames.length; /// I hit error here
              var vslen:uint = vsNames.length;
             
              for (var i:int = 0; i < n; i ++)
              {
                  if (_horizontalAxisRenderers[i] is DualStyleObject)
                  {
                      DualStyleObject(_horizontalAxisRenderers[i]).internalStyleName =
                          hsNames[i % hslen];
                  }
              }
             
              n = _verticalAxisRenderers.length;
              for (i = 0; i < n; i++)
              {
                  if (_verticalAxisRenderers[i] is DualStyleObject)
                  {
                      DualStyleObject(_verticalAxisRenderers[i]).internalStyleName =
                          vsNames[i % vslen];
                  }
              }
          }

       

       

      Thanks

      Hironmay Basu