PHP code example of teamupdivision / fusionexport-upd
1. Go to this page and download the library: Download teamupdivision/fusionexport-upd library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
teamupdivision / fusionexport-upd example snippets
use FusionExport\ExportManager;
use FusionExport\ExportConfig;
e 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";
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.