fusioncharts / fusionexport
PHP Client for FusionExport
Installs: 2 233
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 10
Forks: 2
Open Issues: 1
Language:HTML
Requires
- php: ^7.2.5||^8.0
- guzzlehttp/guzzle: ^7.8
- matthiasmullie/minify: ^1.3
- mikehaertl/php-tmpfile: ^1.1
- paquettg/php-html-parser: ^1.7
- phpmailer/phpmailer: ^6.0
- wa72/html-pretty-min: ^0.2.0
- dev-master
- 2.1.0
- 2.0.0
- 1.2.2
- 1.1.0
- 1.0.3
- 1.0.2
- 1.0.1
- 1.0.0
- 1.0.0-rc
- 1.0.0-beta
- dev-4.0-dev-integration
- dev-guzzle-upgrade-7.8
- dev-develop
- dev-fe-v2.0-clone
- dev-appwrk-fusionexport-2.0
- dev-appwrk-fusionexport-qa
- dev-Support-for-timeout
- dev-FEXPO2-11
- dev-FEXPO2-3
- dev-feature/time-series-example
- dev-feature/export-as-stream
- dev-feature/header-footer
- dev-feature/php5-support
- dev-release/1.0.0
- dev-feature/http-support
- dev-release/1.0.0-rc
This package is auto-updated.
Last update: 2025-03-14 09:48:20 UTC
README
PHP SDK for FusionExport. Enables exporting from PHP using FusionExport.
Installation
To install this package, simply use composer:
composer require fusioncharts/fusionexport
Usage
To use the SDK in your project:
use FusionExport\ExportManager; use FusionExport\ExportConfig;
Getting Started
Start with a simple chart export. For exporting a single chart just pass the chart configuration as you would have passed it to the FusionCharts constructor.
<?php require __DIR__ . '/../vendor/autoload.php'; // Use the FusionExport components use FusionExport\ExportManager; use FusionExport\ExportConfig; // Instantiate ExportManager $exportManager = new ExportManager(); // Instantiate ExportConfig $exportConfig = new ExportConfig(); $config = (object)[ "type" => "column2d", "renderAt" => "chart-container", "width" => "550", "height" => "350", "id" => "myChartId", "dataFormat" => "json", "dataSource" => (object)[ "chart" => (object)[ "caption" => "Number of visitors last week", "theme" => "ocean", "subCaption" => "Bakersfield Central vs Los Angeles Topanga" ], "data" => [ (object)[ "label" => "Mon", "value" => "15123" ], (object)[ "label" => "Tue", "value" => "14233" ], (object)[ "label" => "Wed", "value" => "25507" ] ] ] ]; $exportConfig->set('chartConfig', $config); // Export the chart by providing the exportConfig to the exportManager $files = $exportManager->export($exportConfig, '.', true); foreach ($files as $file) { echo $file . "\n"; }
API Reference
You can find the full reference here.