stimulsoft/dashboards-php

Stimulsoft Dashboards.PHP

2024.3.6 2024-09-23 07:02 UTC

README

Stimulsoft Dashboards.PHP 是一个用于设计和查看仪表板的完整软件包。您可以将其用于应用程序集成或作为独立解决方案。同时,不需要复杂的配置或第三方模块。您可以将仪表板轻松集成到几乎任何 PHP 应用程序中。

安装

产品通过Composer 仓库进行分发。您可以使用以下命令添加必要的库

composer require stimulsoft/dashboards-php

使用方法

将所需的最小代码添加到页面中

<?php
require_once 'vendor/autoload.php';
?>

<head> 部分中渲染必要的脚本

<head>
<?php
    $js = new \Stimulsoft\StiJavaScript(\Stimulsoft\StiComponentType::Viewer);
    $js->renderHtml();
?>
</head>

在页面的 <script> 部分中创建并渲染请求处理器

<script>
<?php
    $handler = new \Stimulsoft\StiHandler();
    $handler->renderHtml();
?>
</script>

在页面的 <script> 部分中创建并渲染组件

<script>
<?php
    $viewer = new \Stimulsoft\Viewer\StiViewer();
    $report = new \Stimulsoft\Report\StiReport();
    $report->loadFile('reports/SimpleDashboard.mrt');
    $viewer->report = $report;
    $viewer->renderHtml();
?>
</script>

有用的链接

在线演示

示例项目

产品页面

免费下载

许可证