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

DateTimeAxis throws Error #1009 when there is null date

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • Adobe Flex SDK 3.0 (Release)
    • None
    • Charts:Data Graphics
    • None
    • Affected OS(s): All OS Platforms
      Affected OS(s): All OS Platforms
      Language Found: English

    Description

      Steps to reproduce:
      1. Run test.mxml.

      Actual Results:
      TypeError: Error #1009: Cannot access a property or method of a null object reference.
      at mx.charts::DateTimeAxis/mapCache()[C:\Work\flex\dmv_automation\projects\datavisualisation\src\mx\charts\DateTimeAxis.as:1403]
      at mx.charts.series::ColumnSeries/updateMapping()[C:\Work\flex\dmv_automation\projects\datavisualisation\src\mx\charts\series\ColumnSeries.as:1184]

      Expected Results:
      Null date does not appear in the chart.

      Workaround (if any):
      I extend DateTimeAxis.mapCache (see DTAxis.as) and in test.mxml replace:
      <mx:DateTimeAxis dataUnits="days" />
      By
      <local:DTAxis dataUnits="days" />

      The problem happens in lines:
      1386: v[convertedField] = Date.parse(v[field].toString());
      1394: v[convertedField] = Number(v[field].toString());
      1403: v[convertedField] = v[field].getTime();
      because v[field] may be null.

      Attachments

        Activity

          People

            adobejira Adobe JIRA
            adobejira Adobe JIRA
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: