[flexcoders] Re: deprecated horizontalAxisRenderer

2008-08-09 Thread Michael VanDaniker
You best bet is step through the function that is throwing the null
reference error.  We might be working with different versions of the
charting sdk, but the problem line, line 2087 CartesianChart.as, in my
copy reads

rect.top = _computedGutters.top;

so it sounds like either rect or _computedGutters are null.  I would
suspect _computedGutters more than rect. You can set a break point at
the beginning of CartesianChart.updateAxisLayout and see where it gets
nulled out.  After that you might be able to deduce what is wrong with
the custom AxisRenderer you're using.

If you need any more help, feel free to ask.  If you can tell us when
_computedGutters becomes null, we might be able to provide some
insight as to why.

Question for you: Was the AxisRenderer you found written for Flex 2 or 3?

--- In flexcoders@yahoogroups.com, coder3 <[EMAIL PROTECTED]> wrote:
>
> 
> thanks!!! if i use the out of box code, it works fine. 
> 
> but the problem is, i use an extended AxisRenderer .as class,
>
http://bugs.adobe.com/jira/secure/attachment/12340/InnerAxisRenderer.as.
now
> i got this run time error: 
> 
> do i need to modify the class? how?
> 
> 
> 
> TypeError: Error #1009: Cannot access a property or method of a null
object
> reference.
>   at
>
mx.charts.chartClasses::CartesianChart/updateAxisLayout()[C:\Work\flex\dmv_automation\projects\datavisualisation\src\mx\charts\chartClasses\CartesianChart.as:2087]
>   at
>
mx.charts.chartClasses::CartesianChart/updateDisplayList()[C:\Work\flex\dmv_automation\projects\datavisualisation\src\mx\charts\chartClasses\CartesianChart.as:1355]
>   at
>
mx.core::UIComponent/validateDisplayList()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\core\UIComponent.as:6214]
>   at
>
mx.managers::LayoutManager/validateDisplayList()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\managers\LayoutManager.as:602]
>   at
>
mx.managers::LayoutManager/doPhasedInstantiation()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\managers\LayoutManager.as:657]
>   at Function/http://adobe.com/AS3/2006/builtin::apply()
>   at
>
mx.core::UIComponent/callLaterDispatcher2()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\core\UIComponent.as:8460]
>   at
>
mx.core::UIComponent/callLaterDispatcher()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\core\UIComponent.as:8403]
> 
> 
> 
> 
> 
> Michael VanDaniker wrote:
> > 
> > Certainly!
> > 
> > 
> >  
> >   
> >  
> >  
> >   
> >  
> >  
> >   
> >  
> >  
> >   
> >  
> >  
> >> yField="bar"/>
> >  
> > 
> > 
> > I didn't compile this, but it should be pretty close.
> > 
> > Also, check out the example in the documentation for AxisRenderer:
> >
http://livedocs.adobe.com/flex/3/langref/mx/charts/AxisRenderer.html#includeExamplesSummary
> > 
> > --- In flexcoders@yahoogroups.com, coder3  wrote:
> >>
> >> 
> >> not sure how to do it.
> >> 
> >> is there an example?
> >> 
> >> thanks
> >> 
> >> 
> >> 
> >> Michael VanDaniker wrote:
> >> > 
> >> > You have to tell your AxisRenderer which axis it should render by
> >> > setting the axis property.
> >> > 
> >> > --- In flexcoders@yahoogroups.com, coder3  wrote:
> >> >>
> >> >> 
> >> >> Hi All, i have flex2 code, and now shows warnings in flex 3
> >> >> 
> >> >> for example, 
> >> >> 
> >> >> 
> >> >> :::
> >> >> 
> >> >> 
> >> >>  >> >> styleName="noAxisStyle" />
> >> >> 
> >> >> :::
> >> >> 
> >> >> 
> >> >> will shows warning:
> >> >> 
> >> >>  'horizontalAxisRenderer' has been deprecated. Please use
> >> >> 'CartesianChart.horizontalAxisRenderers'
> >> >> 
> >> >> I don't know what to do so i just change
> >  to
> >> >> 
> >> >> 
> >> >> it compiled but it gives me runtime error as following. so i must
> > miss
> >> >> something. what is it?
> >> >> 
> >> >> thanks!!
> >> >> c
> >> >> 
> >> >> 
> >> >> Error: Property axis is not set for this AxisRenderer
> >> >> at
> >> >>
> >> >
> >
mx.charts::AxisRenderer/measureLabels()[C:\Work\flex\dmv_automation\projects\datavisualisation\src\mx\charts\AxisRenderer.as:1738]
> >> >> at
> >> >>
> >> >
> >
mx.charts::AxisRenderer/adjustGutters()[C:\Work\flex\dmv_automation\projects\datavisualisation\src\mx\charts\AxisRenderer.as:1364]
> >> >> at
> >> >>
> >> >
> >
mx.charts.chartClasses::CartesianChart/updateAxisLayout()[C:\Work\flex\dmv_automation\projects\datavisualisation\src\mx\charts\chartClasses\CartesianChart.as:2019]
> >> >> at
> >> >>
> >> >
> >
mx.charts.chartClasses::CartesianChart/updateDisplayList()[C:\Work\flex\dmv_automation\projects\datavisualisation\src\mx\charts\chartClasses\CartesianChart.as:1355]
> >> >> at
> >> >>
> >> >
> >
mx.core::UIComponent/validateDisplayList()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\core\UIComponent.as:6214]
> >> >> at
> >> >>
> >> >
> >
mx.managers::LayoutManager/validateDisplayList()[E:\dev\3.0.x\frameworks\projects\framework\s

[flexcoders] Re: deprecated horizontalAxisRenderer

2008-08-08 Thread Michael VanDaniker
Certainly!


 
  
 
 
  
 
 
  
 
 
  
 
 
  
 


I didn't compile this, but it should be pretty close.

Also, check out the example in the documentation for AxisRenderer:
http://livedocs.adobe.com/flex/3/langref/mx/charts/AxisRenderer.html#includeExamplesSummary

--- In flexcoders@yahoogroups.com, coder3 <[EMAIL PROTECTED]> wrote:
>
> 
> not sure how to do it.
> 
> is there an example?
> 
> thanks
> 
> 
> 
> Michael VanDaniker wrote:
> > 
> > You have to tell your AxisRenderer which axis it should render by
> > setting the axis property.
> > 
> > --- In flexcoders@yahoogroups.com, coder3  wrote:
> >>
> >> 
> >> Hi All, i have flex2 code, and now shows warnings in flex 3
> >> 
> >> for example, 
> >> 
> >> 
> >> :::
> >>
> >>
> >>
> >>
> >> :::
> >> 
> >> 
> >> will shows warning:
> >> 
> >>  'horizontalAxisRenderer' has been deprecated. Please use
> >> 'CartesianChart.horizontalAxisRenderers'
> >> 
> >> I don't know what to do so i just change
 to
> >> 
> >> 
> >> it compiled but it gives me runtime error as following. so i must
miss
> >> something. what is it?
> >> 
> >> thanks!!
> >> c
> >> 
> >> 
> >> Error: Property axis is not set for this AxisRenderer
> >>at
> >>
> >
mx.charts::AxisRenderer/measureLabels()[C:\Work\flex\dmv_automation\projects\datavisualisation\src\mx\charts\AxisRenderer.as:1738]
> >>at
> >>
> >
mx.charts::AxisRenderer/adjustGutters()[C:\Work\flex\dmv_automation\projects\datavisualisation\src\mx\charts\AxisRenderer.as:1364]
> >>at
> >>
> >
mx.charts.chartClasses::CartesianChart/updateAxisLayout()[C:\Work\flex\dmv_automation\projects\datavisualisation\src\mx\charts\chartClasses\CartesianChart.as:2019]
> >>at
> >>
> >
mx.charts.chartClasses::CartesianChart/updateDisplayList()[C:\Work\flex\dmv_automation\projects\datavisualisation\src\mx\charts\chartClasses\CartesianChart.as:1355]
> >>at
> >>
> >
mx.core::UIComponent/validateDisplayList()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\core\UIComponent.as:6214]
> >>at
> >>
> >
mx.managers::LayoutManager/validateDisplayList()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\managers\LayoutManager.as:602]
> >>at
> >>
> >
mx.managers::LayoutManager/doPhasedInstantiation()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\managers\LayoutManager.as:657]
> >>at Function/http://adobe.com/AS3/2006/builtin::apply()
> >>at
> >>
> >
mx.core::UIComponent/callLaterDispatcher2()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\core\UIComponent.as:8460]
> >>at
> >>
> >
mx.core::UIComponent/callLaterDispatcher()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\core\UIComponent.as:8403]
> >> 
> >> 
> >> 
> >> -- 
> >> View this message in context:
> >
http://www.nabble.com/deprecated-horizontalAxisRenderer-tp18900354p18900354.html
> >> Sent from the FlexCoders mailing list archive at Nabble.com.
> >>
> > 
> > 
> > 
> > 
> 
> -- 
> View this message in context:
http://www.nabble.com/deprecated-horizontalAxisRenderer-tp18900354p18900481.html
> Sent from the FlexCoders mailing list archive at Nabble.com.
>




[flexcoders] Re: deprecated horizontalAxisRenderer

2008-08-08 Thread Michael VanDaniker
You have to tell your AxisRenderer which axis it should render by
setting the axis property.

--- In flexcoders@yahoogroups.com, coder3 <[EMAIL PROTECTED]> wrote:
>
> 
> Hi All, i have flex2 code, and now shows warnings in flex 3
> 
> for example, 
> 
> 
> :::
>   
>   
>   
>   
> :::
> 
> 
> will shows warning:
> 
>  'horizontalAxisRenderer' has been deprecated. Please use
> 'CartesianChart.horizontalAxisRenderers'
> 
> I don't know what to do so i just change  to
> 
> 
> it compiled but it gives me runtime error as following. so i must miss
> something. what is it?
> 
> thanks!!
> c
> 
> 
> Error: Property axis is not set for this AxisRenderer
>   at
>
mx.charts::AxisRenderer/measureLabels()[C:\Work\flex\dmv_automation\projects\datavisualisation\src\mx\charts\AxisRenderer.as:1738]
>   at
>
mx.charts::AxisRenderer/adjustGutters()[C:\Work\flex\dmv_automation\projects\datavisualisation\src\mx\charts\AxisRenderer.as:1364]
>   at
>
mx.charts.chartClasses::CartesianChart/updateAxisLayout()[C:\Work\flex\dmv_automation\projects\datavisualisation\src\mx\charts\chartClasses\CartesianChart.as:2019]
>   at
>
mx.charts.chartClasses::CartesianChart/updateDisplayList()[C:\Work\flex\dmv_automation\projects\datavisualisation\src\mx\charts\chartClasses\CartesianChart.as:1355]
>   at
>
mx.core::UIComponent/validateDisplayList()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\core\UIComponent.as:6214]
>   at
>
mx.managers::LayoutManager/validateDisplayList()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\managers\LayoutManager.as:602]
>   at
>
mx.managers::LayoutManager/doPhasedInstantiation()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\managers\LayoutManager.as:657]
>   at Function/http://adobe.com/AS3/2006/builtin::apply()
>   at
>
mx.core::UIComponent/callLaterDispatcher2()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\core\UIComponent.as:8460]
>   at
>
mx.core::UIComponent/callLaterDispatcher()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\core\UIComponent.as:8403]
> 
> 
> 
> -- 
> View this message in context:
http://www.nabble.com/deprecated-horizontalAxisRenderer-tp18900354p18900354.html
> Sent from the FlexCoders mailing list archive at Nabble.com.
>