I'm upgrading a Flex application from SDK 3.5 to 4.1.
I have a problem with mx.charts.AreaChart, namely with it's horizontal AxisRenderer for DateTimeAxis.
During layouting one of its internal variable (lastLabel in calcRotationAndSpacing() method) can become null, causing Null pointer error.
From examining the source code it looks like the problem happens in calcRotationAndSpacing() when there is just one label (didn't examine yet why, but presumably for small regions and narrow datasets that may happen, though it may be a bug generating labels), canDropLabels==true, then at line 1814:
lastLabel = _labels[maxSkipCount + 1];
Even though maxSkipCount==0, _labels array has nothing at index 1, returning null.
In SDK 3 the label was calculated differently:
lastLabel = _labels[_labels.length - 1];
always returning at least the first label.
I can build a sample app, but to save time would like to know first if anybody had this before, and if isn't that an obvious bug?
Later code has no graceful handler for when lastLabel==null
By googling for AxisRenderer it appears, that the class has a number of similar issues. There is at least one JIRA https://bugs.adobe.com/jira/browse/FLEXDMV-2275
Sounds like I won't have another choice but figuring out a workaround to prevent too few labels, may be by holding on renderer customization till creation is complete.
I have been facing exactly the same problem.
I am also upgrading my project from Flex 3.5 to 4.1.
I've also tried to solution mentioned on the jira link you have mentioned but it doesn't seem to be working.
Let me know in case you or any one else has a solution for this.