定制 lonnyx/nova-apex-chart 二次开发

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

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

lonnyx/nova-apex-chart

最新稳定版本:v1.3.0

Composer 安装命令:

composer require lonnyx/nova-apex-chart

包简介

A Laravel Nova Apex Chart Component.

README 文档

README

Latest Version on Packagist Total Downloads License

A Laravel Nova ApexCharts Component

This package is a fork of dcasia/nova-apex-chart, compatible with Nova 4 and with date filter

ApexCharts Documentation

LineCharts in Action LineCharts DateFilter

Installation

You can install the package via composer:

composer require lonnyx/nova-apex-chart

Basic Usage

class ExampleNovaResource extends Resource
{

    public function cards(Request $request)
        {

            return [
                (new NovaApexChart())
                    ->type('bar')
                    ->series(
                        [
                            new DataOnlySeries([ 400, 430, 448, 470, 540, 580, 690, 1100, 1200, 1380 ])
                        ])
                    ->options([
                        'xaxis' => [
                            'categories' => [ 'Jan', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct' ]
                        ],
                        'tooltip' => [
                            'y' => [
                                'formatter' => new BasicFormatter('$', 'USD')
                            ]
                        ]
                    ])
            ];
        }

}

Create basic series by calling

use LonnyX\NovaApexChart\BasicSeries;
new BasicSeries('title', [ 400, 430, 448, 470, 540, 580, 690, 1100, 1200, 1380 ]);

Create data only series by calling

use LonnyX\NovaApexChart\DataOnlySeries;
new DataOnlySeries([ 400, 430, 448, 470, 540, 580, 690, 1100, 1200, 1380 ]);

Create custom formatter

use LonnyX\NovaApexChart\formatter\BasicFormatter;
new BasicFormatter('$', 'USD');

Show comma separated numbers

use LonnyX\NovaApexChart\formatter\BasicFormatter;
new BasicFormatter('', '', true);

License

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

统计信息

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

GitHub 信息

  • Stars: 6
  • Watchers: 0
  • Forks: 1
  • 开发语言: Vue

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-07-19