!!top!! Download | Fusioncharts.php
// Step 1: Prepare your data $chartData = '{ "chart": { "caption": "Monthly Revenue", "theme": "fusion" }, "data": [ {"label": "Jan", "value": "420000"}, {"label": "Feb", "value": "810000"} ] }'; // Step 2: Create the chart object $columnChart = new FusionCharts("column2d", "myFirstChart", "100%", "400", "chart-container", "json", $chartData); // Step 3: Render the chart $columnChart->render(); ``` ### Why Use the PHP Wrapper? * **No JavaScript Required:** It automatically generates the required ` ` tags and DIV containers for you. * **Database Connectivity:** It makes it easier to fetch data from **MySQL** or **NoSQL** databases and pass it directly to your charts. * **Flexible Exports:** Supports server-side and client-side exports to PDF, PNG, and JPEG. * **Open Source:** The integration component itself is distributed under the **MIT License**, though the core library has its own commercial licensing. For specialized needs like time-series data, you may also need to download and include the [FusionTime component](https://www.fusioncharts.com/dev/fusiontime/integrations/php/your-first-chart-using-php-in-fusiontime). **Would you like a more detailed example showing how to pull data from a MySQL database to populate your FusionCharts?** Use code with caution. Create a Chart Using PHP in FusionCharts
Once installed, you can render a chart by providing data in JSON or XML format. Below is a basic example of how the wrapper translates PHP data into a chart: fusioncharts.php download
Use the FusionCharts class provided by the wrapper to define your chart type, data source, and dimensions. Creating Your First Chart // Step 1: Prepare your data $chartData =
Ensure your HTML section includes the base FusionCharts library: **Would you like a more detailed example showing
You can download the latest version of the fusioncharts-php-wrapper directly from GitHub. Key Requirements PHP Version: Requires PHP 5.6 or higher .
``` Use code with caution.
Download the complete FusionCharts Suite XT package . After unzipping, the wrapper is located at: fusioncharts-suite-xt > integrations > php > fusioncharts-wrapper .