承接 arbermustafa/filament-google-charts-widgets 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

arbermustafa/filament-google-charts-widgets

Composer 安装命令:

composer require arbermustafa/filament-google-charts-widgets

包简介

Chart widgets for Filament Php using Google Charts

README 文档

README

Create chart widgets using Google Charts.

Installation

You can install the package into a Laravel app that uses Filament via composer::

composer require arbermustafa/filament-google-charts-widgets

Filament V2 - if you are using Filament v2.x, you can use this section

You can publish the config file with:

php artisan vendor:publish --tag=filament-google-charts-widgets-config

The config file contains default global customization options for better charts rendering in light/dark theme based on the great work of Weekdone

Optionally, you can publish the view using:

php artisan vendor:publish --tag=filament-google-charts-widgets-views

Usage

Pie chart

use ArberMustafa\FilamentGoogleCharts\Widgets\PieChartWidget;

class DemoPieChart extends PieChartWidget
{
    protected static ?int $sort = 1;

    protected static ?array $options = [
        'legend' => [
            'position' => 'top',
            'alignment' => 'center',
        ],
        'height' => 400,
        'is3D' => false,
    ];

    protected function getHeading(): string
    {
        return 'Pie chart';
    }

    protected function getData(): array
    {
        return [
            ['Label', 'Aggregate'],
            ['Col1', 7.2],
            ['Col2', 23.7],
            ['Col3', 11.1],
        ];
    }
}

Donut chart

use ArberMustafa\FilamentGoogleCharts\Widgets\DonutChartWidget;

class DemoDonutChart extends DonutChartWidget
{
    protected static ?string $heading = 'Donut chart';

    protected static ?int $sort = 2;

    protected static ?float $pieHole = 0.5;

    protected static ?array $options = [
        'legend' => [
            'position' => 'top',
        ],
        'height' => 400,
    ];

    protected function getData(): array
    {
        return [
            ['Label', 'Aggregate'],
            ['Col1', 17.2],
            ['Col2', 23.7],
            ['Col3', 11.1],
        ];
    }
}

Pie & Donut charts

Available chart types

Below is a list of available chart widget classes which you may extend, and their corresponding Google Charts documentation page, for inspiration what to return from getData():

Live updating (polling)

By default, chart widgets refresh their data every 5 seconds.

To customize this, you may override the $pollingInterval property on the class to a new interval:

protected static ?string $pollingInterval = '10s';

Alternatively, you may disable polling altogether:

protected static ?string $pollingInterval = null;

Chart configuration options

You may specify an $options variable on the chart class to control the many configuration options that the Google Charts library provides. For instance, you could change the position off the legend for PieChartWidget class and set a custom height:

protected static ?array $options = [
        'legend' => [
            'position' => 'bottom',
        ],
        'height' => 300,
    ];

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

If you want to contribute to this package, you may want to test it in a real Filament project:

  • Fork this repository to your Github account.
  • Create a Filament app locally.
  • Clone your fork in your Filament app root directoy.
  • In the /filament-google-charts-widgets directory, create a branch for your fix/improvement, e.g. fix/pie-chart.

Install the packages in your app's composer.json:

"require": {
    "arbermustafa/filament-google-charts-widgets": "dev-fix/pie-chart as dev-main",
},
"repositories": [
    {
        "type": "path",
        "url": "./filament-google-charts-widgets"
    }
]

Now run composer update.

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.

arbermustafa/filament-google-charts-widgets 适用场景与选型建议

arbermustafa/filament-google-charts-widgets 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 8.2k 次下载、GitHub Stars 达 14, 最近一次更新时间为 2022 年 12 月 05 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「php」 「charts」 「laravel」 「google-charts」 「filament-plugin」 「arbermustafa」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 arbermustafa/filament-google-charts-widgets 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 arbermustafa/filament-google-charts-widgets 我们能提供哪些服务?
定制开发 / 二次开发

基于 arbermustafa/filament-google-charts-widgets 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 8.2k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 14
  • 点击次数: 9
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 14
  • Watchers: 2
  • Forks: 4
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-12-05