https://github.com/fusioncharts/fusionexport-php-client
Language SDK for FusionExport which enables exporting of charts & dashboards through PHP.
https://github.com/fusioncharts/fusionexport-php-client
fusionexport
Last synced: 5 months ago
JSON representation
Language SDK for FusionExport which enables exporting of charts & dashboards through PHP.
- Host: GitHub
- URL: https://github.com/fusioncharts/fusionexport-php-client
- Owner: fusioncharts
- Created: 2017-12-01T10:40:38.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2024-06-14T08:17:50.000Z (over 1 year ago)
- Last Synced: 2025-06-16T03:24:22.211Z (6 months ago)
- Topics: fusionexport
- Language: HTML
- Size: 1.21 MB
- Stars: 2
- Watchers: 10
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# FusionExport PHP Client
PHP SDK for FusionExport. Enables exporting from PHP using FusionExport.
## Installation
To install this package, simply use composer:
```bash
composer require fusioncharts/fusionexport
```
## Usage
To use the SDK in your project:
```php
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
"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](https://www.fusioncharts.com/dev/exporting-charts/using-fusionexport/sdk-api-reference/php.html).