added production line count chart

This commit is contained in:
dhanabalan
2025-04-23 15:18:08 +05:30
parent e4ffddbbe3
commit 12f2b25bcb
5 changed files with 243 additions and 60 deletions

View File

@@ -8,8 +8,7 @@ class ItemOverview extends ChartWidget
{
protected static ?string $heading = 'Hourly Production';
// protected int|string|array $columnSpan = 'full';
protected int|string|array $columnSpan = 12;
protected int|string|array $columnSpan = '12';
protected static ?string $maxHeight = '350px';
@@ -146,20 +145,6 @@ class ItemOverview extends ChartWidget
return 'line';
}
// protected function getContent(): string
// {
// return '<div style="height: 100%;">' . $this->chart->render() . '</div>';
// }
// protected function getContent(): string
// {
// return <<<HTML
// <div id="chart-container" style="height: 100vh; width: 100%;">
// {$this->chart->render()}
// </div>
// HTML;
// }
protected function getOptions(): array
{
@@ -173,15 +158,6 @@ class ItemOverview extends ChartWidget
],
],
],
// 'scales' => [
// 'y' => [
// 'beginAtZero' => true, //Start Y-axis from 0
// 'ticks' => [
// 'stepSize' => 0.5,
// ],
// ],
// ],
];
}
@@ -194,4 +170,10 @@ class ItemOverview extends ChartWidget
'this_month'=> 'This Month',
];
}
public static function canView(): bool
{
// Only show on HourlyProduction page
return request()->routeIs('filament.pages.hourly-production');
}
}