Loading Scripts in Part to Minify Project
Unsere Beispiele der Projekte und Berichtsvorlagen helfen Ihnen, die Grundlagen der Arbeit mit unserer Software zu erlernen.Dieses Beispiel ist veraltet, checken Sie viele anderen aktualisierten Beispiele in dieser Kategorie aus.This example shows how to minify project. First, you need to add the Stimulsoft libraries:
Next, you should define JavaScript modules required for the component to work. Additionally, you can use a packaged version of scripts to speed up loading and save traffic. All code should be added in the
Now you can use the code to deploy the dashboard engine and the viewer or designer component. The code will be exactly the same as when using a full set of scripts.
<?php
require_once 'vendor/autoload.php';
?>
Next, you should define JavaScript modules required for the component to work. Additionally, you can use a packaged version of scripts to speed up loading and save traffic. All code should be added in the
<head> block of the HTML page:
<?php
$js = new \Stimulsoft\StiJavaScript(\Stimulsoft\StiComponentType::Designer);
$js->options->reports = false;
$js->options->blocklyEditor = false;
$js->options->reportsChart = true;
$js->options->reportsExport = true;
$js->options->reportsImportXlsx = false;
$js->options->reportsMaps = false;
$js->usePacked = true;
$js->renderHtml();
?>
Now you can use the code to deploy the dashboard engine and the viewer or designer component. The code will be exactly the same as when using a full set of scripts.