From 4e8b42ced305adcf787f3ccbaff7b657b5ebb36b Mon Sep 17 00:00:00 2001 From: TzeYiing Date: Mon, 28 Mar 2022 18:57:54 +0200 Subject: [PATCH] chore: removed 24h data load message when no data in BarChart --- .../interfaces/Settings/Logs/LogEventChart.tsx | 1 + .../components/to-be-cleaned/Charts/ChartRenderer.tsx | 10 ++++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/studio/components/interfaces/Settings/Logs/LogEventChart.tsx b/studio/components/interfaces/Settings/Logs/LogEventChart.tsx index 822d76b3d27..55dd0fa6d12 100644 --- a/studio/components/interfaces/Settings/Logs/LogEventChart.tsx +++ b/studio/components/interfaces/Settings/Logs/LogEventChart.tsx @@ -29,6 +29,7 @@ const LogEventChart: React.FC = ({ data, onBarClick }) => { }} customDateFormat="MMM D, HH:mm" displayDateInUtc + noDataMessage={""} /> ) } diff --git a/studio/components/to-be-cleaned/Charts/ChartRenderer.tsx b/studio/components/to-be-cleaned/Charts/ChartRenderer.tsx index f1deaaefcfd..6f668d0420f 100644 --- a/studio/components/to-be-cleaned/Charts/ChartRenderer.tsx +++ b/studio/components/to-be-cleaned/Charts/ChartRenderer.tsx @@ -133,7 +133,7 @@ const Header = ({ ) } -const NoData = () => ( +const NoData = ({ title = 'No data to show', message = 'May take 24 hours for data to show' }) => (
-

No data to show

-

May take 24 hours for data to show

+

{title}

+

{message}

) @@ -177,6 +177,8 @@ export function BarChart({ minimalHeader, minimalChart, className = '', + noDataTitle, + noDataMessage }: any) { const hasData = data ? dataCheck(data, attribute) : true @@ -291,7 +293,7 @@ export function BarChart({ )} ) : ( - + )}