Laravel Community Tools by Tighten
Laravel Nova icon Nova Packages
This package has been marked as abandoned on Packagist. Please proceed with care.

Readme

Nova Apex Chart

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.

Screenshots

Back to Top
Added 3 years ago
Last updated 3 Years Ago
Version v1.3.0
Nova Version ~4.0
Composer
lonnyx/nova-apex-chart
GitHub stars 5
Packagist downloads 1,398

Favorites

6 users favorited

Rating

1.00
(out of 5)
★★★★★
★★★★
★★★
★★
2 ratings

Brought to you by Tighten

Issues/Feature Requests Stats Package Ideas