Welcome, Guest. Please login or register.
Did you miss your activation email?
31 Jul 2010, 11:32:02 UTC
Forum home
+  flexdeveloper.eu Forum
|-+  Flex and ActionScript 3.0
| |-+  Flex Charting (Moderators: JMWhittaker, Jan K, thewarpedcoder, James)
| | |-+  Axis Renderer error
« previous next »
Pages: [1] Print
Author Topic: Axis Renderer error (Read 722 times)
eruma
Newbie FD
*
Posts: 1


« on: 19 Jan 2010, 16:28:00 UTC »

I got an error when trying to run the swf file of my chart...
This ocurred after I changed verticalAxisRenderer to verticalAxisRenderers
Before that I had a deprecated error.

An actionscript error has occured:

Quote
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:1743]
   at mx.charts::AxisRenderer/calcRotationAndSpacing()[C:\work\flex\dmv_automation\projects\datavisualisation\src\mx\charts\AxisRenderer.as:1464]
   at mx.charts::AxisRenderer/adjustGutters()[C:\work\flex\dmv_automation\projects\datavisualisation\src\mx\charts\AxisRenderer.as:1331]
   at mx.charts.chartClasses::CartesianChart/updateAxisLayout()[C:\work\flex\dmv_automation\projects\datavisualisation\src\mx\charts\chartClasses\CartesianChart.as:1941]
   at mx.charts.chartClasses::CartesianChart/updateDisplayList()[C:\work\flex\dmv_automation\projects\datavisualisation\src\mx\charts\chartClasses\CartesianChart.as:1359]
   at mx.core::UIComponent/validateDisplayList()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\core\UIComponent.as:6351]
   at mx.managers::LayoutManager/validateDisplayList()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\managers\LayoutManager.as:622]
   at mx.managers::LayoutManager/doPhasedInstantiation()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\managers\LayoutManager.as:677]
   at Function/http://adobe.com/AS3/2006/builtin::apply()
   at mx.core::UIComponent/callLaterDispatcher2()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\core\UIComponent.as:8628]
   at mx.core::UIComponent/callLaterDispatcher()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\core\UIComponent.as:8568]
« Last Edit: 20 Jan 2010, 09:35:47 UTC by flexy » Logged
flexy
flexdeveloper.eu
Guru/Addict FD
*****
Posts: 3,155


Recovering Coffee Addict & Adobe Expert


WWW
« Reply #1 on: 20 Jan 2010, 09:41:31 UTC »

So I assumed you have some code like this:

Code:
<mx:ColumnChart dataProvider="{myCollection}">
<mx:verticalAxisRenderers>
            <comp:MyCustomAxisRenderer id="myAxis" tickPlacement="none" placement="bottom"  maxVisibleColumns="8"  />
</mx:verticalAxisRenderers>
</mx:ColumnChart>

But you need to tell the AxisRenderer which axis it should render by setting the axis property:

Code:
<mx:ColumnChart dataProvider="{myCollection}">

<mx:verticalAxis>
<mx:LinearAxis id="verticalAxis" />
</mx:verticalAxis>

<mx:verticalAxisRenderers>
<mx:AxisRenderer axis="{verticalAxis}"/>
</mx:verticalAxisRenderers>

</mx:ColumnChart>
Logged

Pages: [1] Print
« previous next »
Share this on: Twitter Twitter Del.icio.us del.icio.us Digg Digg
Jump to:

©2006-2010 Flexdeveloper.eu/Jodie O'Rourke. All rights reserved.
Adobe®, Adobe® Flash™, Adobe® AIR™ and Adobe® Flex™ are registered trademarks of Adobe Systems Incorporated in the United States and other countries. All rights reserved.

Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC