Skip to content

Commit e661d47

Browse files
authored
[Bug] High values not showing in charts (alexjustesen#1832)
* Fix other charts * return null
1 parent 8c13a74 commit e661d47

File tree

5 files changed

+11
-11
lines changed

5 files changed

+11
-11
lines changed

app/Filament/Widgets/RecentDownloadChartWidget.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ protected function getData(): array
5252
'datasets' => [
5353
[
5454
'label' => 'Download',
55-
'data' => $results->map(fn ($item) => ! blank($item->download) ? Number::bitsToMagnitude(bits: $item->download_bits, precision: 2, magnitude: 'mbit') : 0),
55+
'data' => $results->map(fn ($item) => ! blank($item->download) ? Number::bitsToMagnitude(bits: $item->download_bits, precision: 2, magnitude: 'mbit') : null),
5656
'borderColor' => '#0ea5e9',
5757
'backgroundColor' => '#0ea5e9',
5858
'pointBackgroundColor' => '#0ea5e9',

app/Filament/Widgets/RecentDownloadLatencyChartWidget.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ protected function getData(): array
5151
'datasets' => [
5252
[
5353
'label' => 'Average (ms)',
54-
'data' => $results->map(fn ($item) => $item->download_latency_iqm ? number_format($item->download_latency_iqm, 2) : 0),
54+
'data' => $results->map(fn ($item) => $item->download_latency_iqm),
5555
'borderColor' => '#10b981',
5656
'backgroundColor' => '#10b981',
5757
'pointBackgroundColor' => '#10b981',
@@ -61,7 +61,7 @@ protected function getData(): array
6161
],
6262
[
6363
'label' => 'High (ms)',
64-
'data' => $results->map(fn ($item) => $item->download_latency_high ? number_format($item->download_latency_high, 2) : 0),
64+
'data' => $results->map(fn ($item) => $item->download_latency_high),
6565
'borderColor' => '#0ea5e9',
6666
'backgroundColor' => '#0ea5e9',
6767
'pointBackgroundColor' => '#0ea5e9',
@@ -71,7 +71,7 @@ protected function getData(): array
7171
],
7272
[
7373
'label' => 'Low (ms)',
74-
'data' => $results->map(fn ($item) => $item->download_latency_low ? number_format($item->download_latency_low, 2) : 0),
74+
'data' => $results->map(fn ($item) => $item->download_latency_low),
7575
'borderColor' => '#8b5cf6',
7676
'backgroundColor' => '#8b5cf6',
7777
'pointBackgroundColor' => '#8b5cf6',

app/Filament/Widgets/RecentJitterChartWidget.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ protected function getData(): array
5151
'datasets' => [
5252
[
5353
'label' => 'Download (ms)',
54-
'data' => $results->map(fn ($item) => $item->download_jitter ? number_format($item->download_jitter, 2) : 0),
54+
'data' => $results->map(fn ($item) => $item->download_jitter),
5555
'borderColor' => '#0ea5e9',
5656
'backgroundColor' => '#0ea5e9',
5757
'pointBackgroundColor' => '#0ea5e9',
@@ -61,7 +61,7 @@ protected function getData(): array
6161
],
6262
[
6363
'label' => 'Upload (ms)',
64-
'data' => $results->map(fn ($item) => $item->upload_jitter ? number_format($item->upload_jitter, 2) : 0),
64+
'data' => $results->map(fn ($item) => $item->upload_jitter),
6565
'borderColor' => '#8b5cf6',
6666
'backgroundColor' => '#8b5cf6',
6767
'pointBackgroundColor' => '#8b5cf6',
@@ -71,7 +71,7 @@ protected function getData(): array
7171
],
7272
[
7373
'label' => 'Ping (ms)',
74-
'data' => $results->map(fn ($item) => $item->ping_jitter ? number_format($item->ping_jitter, 2) : 0),
74+
'data' => $results->map(fn ($item) => $item->ping_jitter),
7575
'borderColor' => '#10b981',
7676
'backgroundColor' => '#10b981',
7777
'pointBackgroundColor' => '#10b981',

app/Filament/Widgets/RecentUploadChartWidget.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ protected function getData(): array
5252
'datasets' => [
5353
[
5454
'label' => 'Upload',
55-
'data' => $results->map(fn ($item) => ! blank($item->upload) ? Number::bitsToMagnitude(bits: $item->upload_bits, precision: 2, magnitude: 'mbit') : 0),
55+
'data' => $results->map(fn ($item) => ! blank($item->upload) ? Number::bitsToMagnitude(bits: $item->upload_bits, precision: 2, magnitude: 'mbit') : null),
5656
'borderColor' => '#8b5cf6',
5757
'backgroundColor' => '#8b5cf6',
5858
'pointBackgroundColor' => '#8b5cf6',

app/Filament/Widgets/RecentUploadLatencyChartWidget.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ protected function getData(): array
5151
'datasets' => [
5252
[
5353
'label' => 'Average (ms)',
54-
'data' => $results->map(fn ($item) => $item->upload_latency_iqm ? number_format($item->upload_latency_iqm, 2) : 0),
54+
'data' => $results->map(fn ($item) => $item->upload_latency_iqm),
5555
'borderColor' => '#10b981',
5656
'backgroundColor' => '#10b981',
5757
'pointBackgroundColor' => '#10b981',
@@ -61,7 +61,7 @@ protected function getData(): array
6161
],
6262
[
6363
'label' => 'High (ms)',
64-
'data' => $results->map(fn ($item) => $item->upload_latency_high ? number_format($item->upload_latency_high, 2) : 0),
64+
'data' => $results->map(fn ($item) => $item->upload_latency_high),
6565
'borderColor' => '#0ea5e9',
6666
'backgroundColor' => '#0ea5e9',
6767
'pointBackgroundColor' => '#0ea5e9',
@@ -71,7 +71,7 @@ protected function getData(): array
7171
],
7272
[
7373
'label' => 'Low (ms)',
74-
'data' => $results->map(fn ($item) => $item->upload_latency_low ? number_format($item->upload_latency_low, 2) : 0),
74+
'data' => $results->map(fn ($item) => $item->upload_latency_low),
7575
'borderColor' => '#8b5cf6',
7676
'backgroundColor' => '#8b5cf6',
7777
'pointBackgroundColor' => '#8b5cf6',

0 commit comments

Comments
 (0)