variety of premium plugins

Learn More

inline-chart

Installation

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

composer 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:
protected static ?string $maxHeight = '50px';
 
protected int | string | array $columnSpan = 'full';
 
protected static ?string $heading = 'Chart';
 
public ?string $maxWidth = '!w-[150px]';

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

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

use it in your table:

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