From c6cb130d5b39f85fd9a1347821e73df0cda71cf4 Mon Sep 17 00:00:00 2001 From: Nastya Date: Tue, 20 May 2025 16:22:17 +0300 Subject: [PATCH] =?UTF-8?q?=D0=B4=D0=B0=D1=82=D1=8B=20=D0=BD=D0=B0=20gener?= =?UTF-8?q?al=20=D0=B0=D0=BD=D0=B0=D0=BB=D0=B8=D1=82=D0=B8=D0=BA=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/Analytics/General.tsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/pages/Analytics/General.tsx b/src/pages/Analytics/General.tsx index 306b1d4e..be9b7b88 100644 --- a/src/pages/Analytics/General.tsx +++ b/src/pages/Analytics/General.tsx @@ -83,11 +83,11 @@ const GeneralItem = ({ xAxis={[ { data: statiscticsResult ? days : Object.keys(general), - valueFormatter: (value) => - moment.unix(Number(value)).format("DD/MM/YYYY HH") + - statiscticsResult - ? "" - : "ч", + valueFormatter: (value) => { + const timestamp = Number(value); + if (isNaN(timestamp)) return 'Invalid Date'; + return moment.unix(timestamp).format(statiscticsResult ? "DD/MM/YYYY" : "DD/MM/YYYY HH") + (statiscticsResult ? "" : "ч"); + }, }, ]} series={[