Dami Report post Posted October 15, 2012 I've downloaded and installed the Widgets XT package and I want to query the MySQL database to make my gauge. In the little bit of reading I've done, I'm shown the code "echo renderChart(paramters here)" etc. But no where in the trial files is the php function renderChart. Do I have to download/eventually purchase more than just the widgets package to make this possible? TIA Dami Share this post Link to post Share on other sites
Guest Sashibhusan Report post Posted October 16, 2012 (edited) Hi Dami, A warm welcome to FusionCharts Forum. You are in the absolutely correct direction. Yes, renderChart function can be used in PHP to render a chart/gauge. We generally call this as a function of FusionCharts PHP Wrapper Class (FusionCharts.php) - an umbrella wrapper class to render charts and gauges present in all packs of FusionCharts Suite XT pack and FusionWidgets XT (which you have downloaded) is part of this Suite. However, FusionCharts.php is not present in FusionWidgets XT pack. It is present in FusionCharts XT download pack. But not to worry! You do not need to buy FusionCharts XT to procure this. The fully functional PHP wrapper class is present in FusionCharts XT Trial pack and you can easily download the FusionCharts XT Trial pack from http://www.fusioncharts.com/download/trials/. Once downloaded you can get the file from the FusionCharts XT Download Package > Code > PHP > Includes folder. The said PHP folder also provides a lots of code samples which you can try. The code samples presently uses charts from FusionCharts pack, which you just need to replace with charts and gauges from FusionWidgets XT pack. For example, you can change the Column3D.swf chart to Funnel.swf chart. You can also read how these are implemented from the Documentation of FusionCharts XT: 1. Basic Example 2. Using PHP and MySQL Just remember that although these code and documentation pages showcase the use of charts from FusionCharts XT pack, you can simply replace the chart types and use charts from FusionWidgets XT pack. All you would need to do it to understand the XML structure of the various gauges and charts of FusionWidgets XT, and build XML using the format required by the gauges or chart (from FusionWidgets XT pack)you intend to render. Also, using MySQL is simple - you can use you own PHP code to connect to the tables. All you need is to build correct XML (using simple string concatenation) for the required chart. Hope this helps. Edited October 16, 2012 by Sudipto Choudhury Answer modified Share this post Link to post Share on other sites
Dami Report post Posted October 16, 2012 Oh, Benevolent Supreme Being, you have more than answered my question. Thank you for the tip about FusionCharts having the files I need. I have cobbled together a MySQL query and got it to work without the renderChart function, displaying multiple charts per page, based on the query results. This is going to be fun! Thanks again, Dami Share this post Link to post Share on other sites
Guest Sashibhusan Report post Posted October 17, 2012 Share this post Link to post Share on other sites