SpiceChart: remove fixed width and scroll, let bars scale naturally
Deploy / deploy (push) Successful in 15s

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Malek TellissiandClaude Sonnet 4.6 committed 2026-09-13 01:01:01 +02:00
1 parent 22fb5ed09d
commit a7094b6787
2 files changed
-7

No files matched your search

@@ -19,8 +19,6 @@ class SpiceChart extends ApexChartWidget
$data = []; $data = [];
$labels = []; $labels = [];
$count = $spices->count();
foreach ($spices as $spice) { foreach ($spices as $spice) {
if ($spice->unit === 'grams') { if ($spice->unit === 'grams') {
$data[] = round($spice->quantity / 1000, 2); $data[] = round($spice->quantity / 1000, 2);
@@ -41,7 +39,6 @@ class SpiceChart extends ApexChartWidget
'chart' => [ 'chart' => [
'type' => 'bar', 'type' => 'bar',
'height' => 300, 'height' => 300,
'width' => max(600, $count * 120),
], ],
'series' => [ 'series' => [
[ [
@@ -46,10 +46,6 @@ class UserPanelProvider extends PanelProvider
NavigationGroup::make('Ressourcen'), NavigationGroup::make('Ressourcen'),
NavigationGroup::make('CRM'), NavigationGroup::make('CRM'),
]) ])
->renderHook(
PanelsRenderHook::HEAD_END,
fn () => new HtmlString('<style>.filament-apex-charts-chart-container:has(#spiceChart){overflow-x:auto;}</style>')
)
->renderHook( ->renderHook(
PanelsRenderHook::SIDEBAR_FOOTER, PanelsRenderHook::SIDEBAR_FOOTER,
fn () => new HtmlString( fn () => new HtmlString(