dskzpt/typo3-ux-chartjs

在PHP和Fluid中轻松构建和渲染Chart.js图表

安装: 1

依赖: 0

建议者: 0

安全: 0

星标: 0

关注者: 0

分支: 0

公开问题: 0

类型:typo3-cms-extension

1.0.0 2024-03-07 08:59 UTC

This package is auto-updated.

Last update: 2024-09-07 10:20:58 UTC


README

Latest Stable Version Total Downloads Latest Unstable Version License

TYPO3扩展 "typo3-ux-chartjs"

它做什么?

在PHP和Fluid模板中轻松构建Chart.js并渲染它们。

它作为symfony/ux-chartjs软件包的包装器。

安装

推荐使用Composer安装扩展。在基于Composer的TYPO3项目根目录中,只需运行

composer require dskzpt/typo3-ux-chartjs

设置

在开始之前,请确保您已安装EXT:typo3_encore。此扩展将Webpack Encore集成到TYPO3中。

请参阅Symfony UX Chart.js官方文档

此外

# Add this line to your package.json dependencies:
"@symfony/ux-chartjs": "file:vendor/symfony/ux-chartjs/assets",

# Install Chart.js
$ npm i chartjs

# or
$ yarn add chartjs

# Add these lines to your controllers.json:
"@symfony/ux-chartjs": {
    "chart": {
        "enabled": true,
        "fetch": "eager"
    }
},

# run
$ npm install --force
$ npm run watch

# or
$ yarn install --force
$ yarn watch

使用方法

在任何Fluid模板中:只需注册命名空间,然后使用提供的ViewHelper来渲染您的图表

<html xmlns:ux="http://typo3.org/ns/DSKZPT/UX/Chartjs/ViewHelpers">
    <ux:renderChart chart="{chart}" />
</html>

请参阅symfony/ux-chartjs文档以获取更多信息。

贡献

请参阅此存储库中包含的贡献文档。