Skip to content

Commit 6fc3a6e

Browse files
authored
Rounded off the chart lines (alexjustesen#239)
1 parent 4f4421c commit 6fc3a6e

File tree

3 files changed

+18
-0
lines changed

3 files changed

+18
-0
lines changed

app/Filament/Widgets/RecentJitterChart.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,18 +52,27 @@ protected function getData(): array
5252
'data' => $results->map(fn ($item) => $item->getJitterData()['download']),
5353
'borderColor' => '#0ea5e9',
5454
'backgroundColor' => '#0ea5e9',
55+
'fill' => false,
56+
'cubicInterpolationMode' => 'monotone',
57+
'tension' => 0.4,
5558
],
5659
[
5760
'label' => 'Upload',
5861
'data' => $results->map(fn ($item) => $item->getJitterData()['upload']),
5962
'borderColor' => '#8b5cf6',
6063
'backgroundColor' => '#8b5cf6',
64+
'fill' => false,
65+
'cubicInterpolationMode' => 'monotone',
66+
'tension' => 0.4,
6167
],
6268
[
6369
'label' => 'Ping',
6470
'data' => $results->map(fn ($item) => $item->getJitterData()['ping']),
6571
'borderColor' => '#10b981',
6672
'backgroundColor' => '#10b981',
73+
'fill' => false,
74+
'cubicInterpolationMode' => 'monotone',
75+
'tension' => 0.4,
6776
],
6877
],
6978
'labels' => $results->map(fn ($item) => $item->created_at->timezone($settings->timezone)->format('M d - G:i')),

app/Filament/Widgets/RecentPingChart.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@ protected function getData(): array
5252
'data' => $results->map(fn ($item) => $item->ping),
5353
'borderColor' => '#10b981',
5454
'backgroundColor' => '#10b981',
55+
'fill' => false,
56+
'cubicInterpolationMode' => 'monotone',
57+
'tension' => 0.4,
5558
],
5659
],
5760
'labels' => $results->map(fn ($item) => $item->created_at->timezone($settings->timezone)->format('M d - G:i')),

app/Filament/Widgets/RecentSpeedChart.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,18 @@ protected function getData(): array
5252
'data' => $results->map(fn ($item) => formatBits(formatBytesToBits($item->download), 2, false)),
5353
'borderColor' => '#0ea5e9',
5454
'backgroundColor' => '#0ea5e9',
55+
'fill' => false,
56+
'cubicInterpolationMode' => 'monotone',
57+
'tension' => 0.4,
5558
],
5659
[
5760
'label' => 'Upload',
5861
'data' => $results->map(fn ($item) => formatBits(formatBytesToBits($item->upload), 2, false)),
5962
'borderColor' => '#8b5cf6',
6063
'backgroundColor' => '#8b5cf6',
64+
'fill' => false,
65+
'cubicInterpolationMode' => 'monotone',
66+
'tension' => 0.4,
6167
],
6268
],
6369
'labels' => $results->map(fn ($item) => $item->created_at->timezone($settings->timezone)->format('M d - G:i')),

0 commit comments

Comments
 (0)