Configure chart size through URL
FusionCharts Forum
Home       Members    Calendar    Who's On
Welcome Guest ( Login | Register )
        



Configure chart size through URL Expand / Collapse
Author
Message
Posted 7/4/2008 1:15:09 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 10/2/2008 12:49:36 PM
Posts: 4, Visits: 15
Hello,

I'm embedding FC in a FLEX/AS3 application using a SWFLoader. Since there is no compatibility with the AVM3, I cannot set the size of the charts through method calling.

I don't know if I'm missing something, but I was wandering if there is a way to set the size of the chart using a URL variable, like for e.g.  "charts/MSLine.swf?dataURL=asp/Default2.aspx&chartWidth=300&chartHeight=200&debugMode=1".

I've tried Width, width, chartwidth and nothing. In the debug mode it gives me this:

Info: Chart loaded and initialized.
Initial Width: 1276
Initial Height: 907
Scale Mode: noScale.

Can anyone help me.

Thanks in advance.

Jose Loureiro

Post #7190
Posted 7/5/2008 2:15:36 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 10/3/2008 5:38:28 AM
Posts: 9, Visits: 42
Hi,

If you have the chart code, change some portion of the 'Init.as' file (location: com>fusioncharts>includes) as shown below, and recompile.

//Get chart width and height
var _chartWidth : Number =
Number (rootAttr ["chartwidth"]);
var _chartHeight : Number =
Number (rootAttr ["chartheight"]);
//If chart width and chart height
have registered as 0, we update
to Flashvars value
if (_chartWidth == 0 ||
_chartHeight == 0)
{
_chartWidth = Stage.width;
_chartHeight = Stage.height;
}

For the mxml do the following:

mySWFloader.source="MSLine.swf?chartwidth=600&chartheight=400"

thx.

Post #7198
Posted 9/29/2008 1:41:31 AM
FusionCharts Team

FusionCharts TeamFusionCharts TeamFusionCharts TeamFusionCharts TeamFusionCharts TeamFusionCharts TeamFusionCharts TeamFusionCharts Team

Group: Administrators
Last Login: 10/3/2008 2:42:18 AM
Posts: 2,117, Visits: 498
We've (finally) released the beta of FusionCharts for Flex. You can see it and download from http://www.fusioncharts.com/flex/ . The download contains source code of both our demo applications - Chart Explorer and Mortgage, which can also be seen online at http://www.fusioncharts.com/flex/Demos.asp

Your feedback is VERY important to us and as such please do let us know what you think of this and also if you face any bugs.


Thanks,
Pallav Nadhani
FusionCharts Team
Post #8882
« Prev Topic | Next Topic »


Permissions Expand / Collapse

All times are GMT -7:00, Time now is 3:24pm


Execution: 0.063.