定制 kainiklas/filament-gauge 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

kainiklas/filament-gauge

最新稳定版本:v0.2.0

Composer 安装命令:

composer require kainiklas/filament-gauge

包简介

Gauge Chart for FilamentPHP

README 文档

README

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

Filament Gauge

SVG gauge for filament.

Installation

You can install the package via composer:

composer require kainiklas/filament-gauge

Optionally, you can publish the views using

php artisan vendor:publish --tag="filament-gauge-views"

Usage

You can render any numeric value between 0 and 100. The value is rounded. If the value is outside these ranges, you can normalize it with the upperBound() method, e.g., values between 0 and 1 need to be bounded by upperBound(1) and values between 0 and 50 need to be bounded by upperBound(50).

use Kainiklas\FilamentGauge\Enums\GaugeSize;
use Kainiklas\FilamentGauge\Tables\Columns\Gauge;

InlineGauge::make('number')
    // circle size (SM, MD, XL)
    // default: SM
    ->size(Size::MD) 

    // hides the number in the middle of the circle
    ->valueHidden() 

    // set an upper bound to calculate correct percentages
    // this should be the highest possible value
    // default: 100, which means values between 0 and 100
    // example: values between 0 and 1 -> set it to 1
    ->upperBound(1) 

Customize Style

You can customize the style of the component with the following css hook classes:

/* arc, representing the value */
.fi-inline-gauge-section-color {
    @apply text-primary-600
}
/* full circle (the background) */
.fi-inline-gauge-shape-color {
    @apply text-gray-300 dark:text-gray-700
}

Changelog

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

Contributing

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.

统计信息

  • 总下载量: 8
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 4
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 4
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-02-02