Guest Madhumita

AngularGauge not working with Flex Modules

Recommended Posts

Hi,

 

I have created AngularGuage in a Module, and i am calling this module in the application at run time. I am not able to see the AngularGuage(Module is loading dynamically) . But if I have used the same component directly in the Application without using Modules, It is working fine. Did anybody faced this issue. I am new to using FusionWidgets. Can anybody help me how to use AngularGuage with Modules.

 

Thanks in Advance..

 

Avp

Share this post


Link to post
Share on other sites
Guest Madhumita

Hello,

Welcome to FusionCharts Forum. :)

Could you please make sure that all the paths that you have specified in your application is relative to the application and not absolute paths ?

Hope this helps. :)

Share this post


Link to post
Share on other sites

I'm having this same exact issue. I have created a simple application where I test that the widget displays properly:

 

 

 

<components:FusionWidgets FCChartType="AngularGauge" FCUseDefaultData="true"/>

 

 

 

This works flawlessly, and eliminates any doubts that the component isn't properly installed/linked within the project.

 

 

 

I then create another application where the widget is to be created dynamically, upon button click:

 

 

 

private function onClick(event:MouseEvent):void {

 

var gauge:FusionWidgets = new FusionWidgets();

 

gauge.FCUseDefaultData = true;

 

this.addChild( gauge );

 

}

 

 

 

This fails by not displaying anything at all, no error, warning... nothing. I've even tried to call the FCRender() method at various places without any luck.

 

 

 

I've been touting how great these components are to my client, who is about to purchase an OEM license, and I now find that I cannot dynamically add them to an application. Am I missing something obvious here?

 

 

 

Any help would be greatly appreciated, I'm hoping to avoid the embarrassment of having to retract from choosing FusionCharts as our data visualization solution.

Share this post


Link to post
Share on other sites

UPDATE

 

 

 

I also just realized that instantiating and adding the component upon "creationComplete" works:

 

 

 

private function onCreationComplete(event:FlexEvent):void {

 

var gauge:FusionWidgets = new FusionWidgets();

 

gauge.FCUseDefaultData = true;

 

this.addChild( gauge );

 

}

 

 

 

 

Why would it work upon creation complete but (seemingly) not at anytime after that?

 

 

 

Help!

Edited by Guest

Share this post


Link to post
Share on other sites

Hi all,

 

 

 

Could you please try providing the width and height?

 

 

 

for example this works:

 

 

 

<?xml version="1.0" encoding="utf-8"?>

 

<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" xmlns:ns1="com.fusionwidgets.components.*">

 

<mx:Button x="90" y="373" label="Button" click="createChart()"/>

 

<mx:Script>

 

<![CDATA[

 

 

 

 

 

import com.fusionwidgets.components.*;

 

 

 

private function createChart():void {

 

var gauge:FusionWidgets = new FusionWidgets();

 

gauge.height = 200;

 

gauge.width = 200;

 

gauge.FCUseDefaultData = true;

 

this.addChild( gauge );

 

}

 

 

 

]]>

 

</mx:Script>

 

 

 

</mx:Application>

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now