As you might be aware, the technology behind the latest version of Fusion Charts has changed and is now pure javascript. Hence it works quite differently to previous versions.
So, I have been playing around trying to get a Fusion Widget to display inside
an AwareIM form cell. To get it working I tried just a simple sample chart. Once you get that working the rest is easy.
Well, I needed to call upon the awesome support of Vlad and with his great help have now got it working like a charm. This also goes some way to demonstrating the additional power you can achieve by taking advantage of the Advanced scripts capability in Aware.....
Ok... here we go....
Download the latest FusionCharts XT (it is now pure js and comes with charts, maps, gantt, powercharts and widgets in the trial)
Uncompress and copy the entire fusioncharts folder to
C:\AwareIM\Tomcat\webapps\AwareIM
Inside the fusioncharts folder you should have....
\maps
\themes
fusioncharts.js
fusioncharts.charts.js
fusioncharts.gantt.js
fusioncharts.maps.js
fusioncharts.powercharts.js
fusioncharts.widgets.js
Now insert the following two lines into your startup.html in C:\AwareIM\Tomcat\webapps\AwareIM
directly above the CSS seperator line....
<script type="text/javascript" src="../fusioncharts/fusioncharts.js"></script>
<script type="text/javascript" src="../fusioncharts/themes/fusioncharts.theme.fint.js"></script>
Create a html cell on an Aware form of a BO which contains ONLY the following....
<div id="chartContainer" style='height: 500px'></div>
Now go back to the dialog that shows the Form Section of that BO. This is the one that Buttons and Auto Refresh buttons and the form size on it.
In the top right hand side is an Advanced button. In there you will see a section for Initialisation Script and Render Script.
In the Render Script section place the following as an example chart...as an example..
FusionCharts.ready(function () {
var myChart = new FusionCharts({
"type": "column2d",
"renderAt": "chartContainer",
"width": "500",
"height": "300",
"dataFormat": "xml",
"dataSource": "<chart caption='Harrys SuperMart' subcaption='Monthly revenue for last year' xaxisname='Month' yaxisname='Amount' numberprefix='$' palettecolors='#008ee4' bgalpha='0' borderalpha='20' canvasborderalpha='0' theme='fint' useplotgradientcolor='0' plotborderalpha='10' placevaluesinside='1' rotatevalues='1' valuefontcolor='#ffffff' captionpadding='20' showaxislines='1' axislinealpha='25' divlinealpha='10'><set label='Jan' value='<<LoggedInRegularUser.MyValue>>' /><set label='Feb' value='810000' /><set label='Mar' value='720000' /><set label='Apr' value='550000' /><set label='May' value='910000' /><set label='Jun' value='510000' /><set label='Jul' value='680000' /><set label='Aug' value='620000' /><set label='Sep' value='610000' /><set label='Oct' value='490000' /><set label='Nov' value='900000' /><set label='Dec' value='730000' /></chart>"
});
myChart.render();
});
Now in your RegularUser BO create an Attribute called MyValue and initialise it to a value, say, 760000. Notice my
reference to <<LoggedInRegularUser.MyValue>> in the above script.
That's it. Now either Create or Edit the form and Viola! In Cell Chart.
Vlad, The Steely Eyed Missile Man does it again. Thanx Man.
Enjoy.
Using Latest FusionCharts XT, v3.4.1 in AwareIM
-
- Posts: 2418
- Joined: Mon Jul 02, 2012 12:24 am
- Location: Ulaanbaatar, Mongolia
Using Latest FusionCharts XT, v3.4.1 in AwareIM
Cheers,
Mark
_________________
AwareIM 6.0, 8.7, 8.8, 9.0 , MariaDB, Windows 10, Ubuntu Linux. Theme: Default, Browser: Arc
Upcloud, Obsidian....
Mark
_________________
AwareIM 6.0, 8.7, 8.8, 9.0 , MariaDB, Windows 10, Ubuntu Linux. Theme: Default, Browser: Arc
Upcloud, Obsidian....
-
- Posts: 2418
- Joined: Mon Jul 02, 2012 12:24 am
- Location: Ulaanbaatar, Mongolia
Hi ACDC,
No I haven't.
But will look into it.
If there was a way to render and export a Fusion Chart in the background on the server then you could easily just then embed the image.
I think the problem is that FC needs to be rendered in a browser first.
No I haven't.
But will look into it.
If there was a way to render and export a Fusion Chart in the background on the server then you could easily just then embed the image.
I think the problem is that FC needs to be rendered in a browser first.
Cheers,
Mark
_________________
AwareIM 6.0, 8.7, 8.8, 9.0 , MariaDB, Windows 10, Ubuntu Linux. Theme: Default, Browser: Arc
Upcloud, Obsidian....
Mark
_________________
AwareIM 6.0, 8.7, 8.8, 9.0 , MariaDB, Windows 10, Ubuntu Linux. Theme: Default, Browser: Arc
Upcloud, Obsidian....
Fusioncharts
It is possible to do this, see the following post and if you get this working please post a comment:
http://blog.fusioncharts.com/2012/02/ge ... ioncharts/
Mark, have you successfully integrated Fusioncharts? Previously there was a free chart package, is that still available in some form? If not, have you paind for a plan and another if so, how much did you pay?
Thanks
http://blog.fusioncharts.com/2012/02/ge ... ioncharts/
Mark, have you successfully integrated Fusioncharts? Previously there was a free chart package, is that still available in some form? If not, have you paind for a plan and another if so, how much did you pay?
Thanks
Henrik (V8 Developer Ed. - Windows)