Uploaded image for project: 'Apache Flex'
  1. Apache Flex
  2. FLEX-34011

Axis Render throws RTE when axis is null

    XMLWordPrintableJSON

Details

    Description

      When a CartesianChart is initialized with a null Axis, which can be created in the future an propagated through bindings, the chart throws RTE because the value is not validated if it's null or not.

      In AxisRenderer,

      public function set axis(value:IAxis):void
      {
      if (_axis)

      { _axis.removeEventListener("axisChange", axisChangeHandler, false); _axis.removeEventListener("titleChange", titleChangeHandler, false); }

      _axis = value;

      value.addEventListener("axisChange", axisChangeHandler,
      false, 0, true);
      value.addEventListener("titleChange", titleChangeHandler,
      false, 0, true);
      }


      should be

      public function set axis(value:IAxis):void
      {
      if (_axis)
      { _axis.removeEventListener("axisChange", axisChangeHandler, false); _axis.removeEventListener("titleChange", titleChangeHandler, false); }

      _axis = value;
      if(value)

      { value.addEventListener("axisChange", axisChangeHandler, false, 0, true); value.addEventListener("titleChange", titleChangeHandler, false, 0, true); }

      }

      Attachments

        Activity

          People

            jmclean Justin Mclean
            jfernandes João Pedro Martins Fernandes
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 0.5h
                0.5h
                Remaining:
                Remaining Estimate - 0.5h
                0.5h
                Logged:
                Time Spent - Not Specified
                Not Specified