Hiya,

I ran into what seems to be the exact same issue with a dashboard app that I'm 
developing.  I worked with the Flex team at Adobe and was able to isolate this 
behavior to a problem with the label styles not getting passed correctly when 
using RSL's for the frameworks.

The solution was to declare a contextualClassFactory instantiated on a subclass 
of Label and then pass this contextualClassFactory instance to the vertical and 
horizontal axis renderers which resolved the issue for me.

Hopefully you're generating your chart in actionscript since I haven't tried 
doing any of this directly in MXML.

I tried to attach the project archive for the test case that I was using to 
demonstrate this issue to the Flex team but couldn't seem to find a way to 
attach it.

If you need some further info shoot me a message with your email and I can send 
you the project archive that shows the fix directly.

Otherwise here's a rough couple of steps that I followed:

1)  Declare a class extending label like this:

package
{
        import mx.controls.Label;
        

        public class MyTextField extends Label
        {
                public function MyTextField()
                {
                        super();
                }
                
        override public function set data(value:Object):void{
                        
            super.data = value;
            text = value.text;
                }
        }
}

2)  Setup a contextualClassFactory referencing this class:

var ccClassFactory:ContextualClassFactory = new 
ContextualClassFactory(MyTextField);
                ccClassFactory.moduleFactory=this.moduleFactory;

3)  Reference the contextualClassFactory when declaring the axisRenderers:

var hAxisRenderer:AxisRenderer = new AxisRenderer();
                hAxisRenderer.axis = hAxis;
                hAxisRenderer.labelRenderer=ccClassFactory;
                
                var vAxisRenderer:AxisRenderer = new AxisRenderer();
                vAxisRenderer.axis = vAxis;
            vAxisRenderer.labelRenderer=ccClassFactory;

4)  Tie the renderers to your chart:

        myChart.horizontalAxis=hAxis;
                myChart.verticalAxis=vAxis;
            myChart.horizontalAxisRenderers = [ hAxisRenderer ];
            myChart.verticalAxisRenderers = [ vAxisRenderer ];

Hope that helps, I know I've been banging my head on this for weeks!

David Granberg

--- In flexcoders@yahoogroups.com, "kthanrahan" <khanra...@...> wrote:
>
> I have developed a flex application using the data visualization components. 
> I am now trying to optimize the application and one of approaches I am trying 
> is to use Runtime Shared Libraries.
> 
> I have configured Flex Builder to deploy with Runtime Shared Libraries and 
> have added the .swz file for the framework, datavisualization and rpc shared 
> libraries. After deploying, my application loads normally with one exception, 
> my axis values within each of my charts are missing. The axes themselves are 
> shown, however they do not have their label units displayed. The series 
> themselves are displayed too.
> 
> I have tried this using the 3.4 SDK and also the 3.2 SDK within Flex Builder. 
> I also tried compiling flex using the mxmlc ANT tasks and got the same 
> results.
> 
> I made sure that the framework RSL is getting loaded first and I also made 
> sure that the global flash cache has been cleared before I tested.
> 
> I can see from my access logs that the .swz files are getting loaded the 
> first time I make a request for my application, so I am confident that I 
> properly cleared the flash player global cache.
> 
> Does anyone know why my axis values would be missing only when I deploy with 
> RSL??? Switching back to Merged mode, my application works fine and it is 
> only when I deploy with RSLs that I get the issue.
> 
> I have also tried to compile using only the framework RSL and not the 
> datavisualization or rpc RSLs (keeping them in merged mode) and I get the 
> same results, no axis values.
> 
> Any help is appreciated.
> 
> Thanks.
>


Reply via email to