From ee40fa0bef68ed400a43a75a45287a02f6de5ede Mon Sep 17 00:00:00 2001 From: ShadowArcanist Date: Fri, 19 Sep 2025 23:14:15 +0530 Subject: [PATCH] Added proper labels for Y axis data on metrics graphs --- .../livewire/project/shared/metrics.blade.php | 44 +++++++++++-------- .../views/livewire/server/charts.blade.php | 44 +++++++++++-------- 2 files changed, 50 insertions(+), 38 deletions(-) diff --git a/resources/views/livewire/project/shared/metrics.blade.php b/resources/views/livewire/project/shared/metrics.blade.php index 582235c36..5b84705f4 100644 --- a/resources/views/livewire/project/shared/metrics.blade.php +++ b/resources/views/livewire/project/shared/metrics.blade.php @@ -129,15 +129,18 @@ } } }, - yaxis: { - show: true, - labels: { - show: true, - style: { - colors: textColor, - } - } - }, + yaxis: { + show: true, + labels: { + show: true, + style: { + colors: textColor, + }, + formatter: function(value) { + return Math.round(value) + ' %'; + } + } + }, noData: { text: 'Loading...', style: { @@ -259,16 +262,19 @@ } } }, - yaxis: { - min: 0, - show: true, - labels: { - show: true, - style: { - colors: textColor, - } - } - }, + yaxis: { + min: 0, + show: true, + labels: { + show: true, + style: { + colors: textColor, + }, + formatter: function(value) { + return Math.round(value) + ' MB'; + } + } + }, noData: { text: 'Loading...', style: { diff --git a/resources/views/livewire/server/charts.blade.php b/resources/views/livewire/server/charts.blade.php index eaa94f6ea..0b9adbe3b 100644 --- a/resources/views/livewire/server/charts.blade.php +++ b/resources/views/livewire/server/charts.blade.php @@ -125,15 +125,18 @@ } } }, - yaxis: { - show: true, - labels: { - show: true, - style: { - colors: textColor, - } - } - }, + yaxis: { + show: true, + labels: { + show: true, + style: { + colors: textColor, + }, + formatter: function(value) { + return Math.round(value) + ' %'; + } + } + }, noData: { text: 'Loading...', style: { @@ -258,16 +261,19 @@ } } }, - yaxis: { - min: 0, - show: true, - labels: { - show: true, - style: { - colors: textColor, - } - } - }, + yaxis: { + min: 0, + show: true, + labels: { + show: true, + style: { + colors: textColor, + }, + formatter: function(value) { + return Math.round(value) + ' %'; + } + } + }, noData: { text: 'Loading...', style: {