Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

chore: removed 24h data load message when no data in BarChart

TzeYiing34f7d5214663
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<Props> = ({ 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' }) => (
<div
className="
h-full w-full
@@ -144,8 +144,8 @@ const NoData = () => (
>
<IconBarChart2 className="text-scale-800" />
<div>
- <p className="text-scale-1100 text-xs">No data to show</p>
- <p className="text-scale-900 text-xs">May take 24 hours for data to show</p>
+ <p className="text-scale-1100 text-xs">{title}</p>
+ <p className="text-scale-900 text-xs">{message}</p>
</div>
</div>
)
@@ -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({
)}
</>
) : (
- <NoData />
+ <NoData title={noDataTitle} message={noDataMessage}/>
)}
</div>
</div>