Loading Scripts in Part to Minify Project
Наши примеры проектов и шаблоны отчётов помогут Вам разобраться в основах работы с нашими продуктами.Этот пример является устаревшим, посмотрите множество других обновлённых примеров в данной категории.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.