inline-chart

Installation

Install Lara Zeus Inline Chart by running the following commands in your Laravel project directory.

1composer require lara-zeus/inline-chart

Usage:

Create a New widget:

  • first create a new widget using filament command:

art make:filament-widget MyTableWidgetChart

  • change the extend of the class to use the abstract:

\LaraZeus\InlineChart\InlineChartWidget

  • available properties:
1protected static ?string $maxHeight = '50px';
2 
3protected int | string | array $columnSpan = 'full';
4 
5protected static ?string $heading = 'Chart';
6 
7public ?string $maxWidth = '!w-[150px]';

and you can access the current row record using: $this->record in your chart data:

1Model::where('child_id',$this->record->id)

use it in your table:

1\LaraZeus\InlineChart\Tables\Columns\InlineChart::make('last activities')
2 ->chart(MiniChart::class)
3 ->maxWidth(350)// int, default 200
4 ->maxHeight(90)// int, default 50
5 ->description('description')
6 ->toggleable(),

Zeus is an open-source project. Thanks to my sponsors for helping me maintain this project.