Ely,
Interestingly, I went and modified one of the examples from the
ChartExplorer to send to reproduce and send to you. It's labelRotation was
set to 90, and the error wouldn't reproduce. So I changed it to 75 (which
is what I had my production chart set to) and sure enough, error. I didn't
try everything > 0 and < 90, but i'd assume that's where the error
occurs... Below is a reproducable app... just drag the divider up until
the label's disappear on the chart.
Thanks
-----------------------------------------------------------------
<?xml
version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="
http://www.adobe.com/2006/mxml">
<mx:Style>
@font-face{
src:
local("arial");
fontFamily: axisFont;
}
.axisStyle
{
fontFamily: axisFont;
}
</mx:Style>
<mx:Script>
<![CDATA[
import
mx.charts.series.BarSeries;
private function formatDataTip(obj:Object):String
{
var
region:String= obj.hitData.item.name;
var seriesName:String= (obj.hitData.element as
BarSeries).displayName;
var value:Object=results.gen[obj.hitData.chartItem.index
][obj.hitData.element.xField];
return
"<b>"+region+"</b><br>"+seriesName+"<br>"+cf.format(value);
}
private function
currencyFormat(value:Number,prevValue:Number,axis:Object):String {
return
cf.format(value);
}
]]>
</mx:Script>
<mx:CurrencyFormatter id="cf"/>
<mx:HTTPService id="srv" url=""/>
<mx:Model
id="results"><gen>{srv.lastResult.data.region}</gen></mx:Model>
<mx:VDividedBox>
<mx:BarChart id="chart" dataProvider="{ results.gen}"
showDataTips="true" width="100%" height="100%"
styleName="axisStyle"
dataTipFunction="formatDataTip">
<mx:verticalAxis>
<mx:CategoryAxis dataProvider="{results.gen}"
categoryField="name"/>
</mx:verticalAxis>
<mx:horizontalAxisRenderer>
<mx:AxisRenderer labelRotation="75" />
</mx:horizontalAxisRenderer>
<mx:horizontalAxis>
<mx:LinearAxis labelFunction="currencyFormat" />
</mx:horizontalAxis>
<mx:series>
<mx:Array>
<mx:BarSeries xField="apple" displayName="Apple"/>
<mx:BarSeries xField="orange" displayName="Orange"/>
<mx:BarSeries xField="banana" displayName="Banana"/>
</mx:Array>
</mx:series>
</mx:BarChart>
<mx:Canvas
/>
</mx:VDividedBox>
</mx:Application>
-----------------------------------------------------------------
On 6/8/06, Ely
Greenfield <[EMAIL PROTECTED]> wrote:
Hi
Brendan. I think I actually just fixed this bug in the mainline a few
days ago. If you have a simple reproducable file you could send me, I can
verify it.
Thanks,
Ely.
Hi,
Came across something today, which I'm guessing should be filed
as a
bug...
If you are using an AxisRenderer on a chart, and resize
the Chart
instance to the point that the labels disappear, you get the
following
Cannot access a property or method of a null object reference.at
mx.charts::AxisRenderer/adjustGutters()[C:\dev\beta3\sdk\frameworks\mx\charts\AxisRenderer.as:1182]
Brendan