Skip to content

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

polish: reduce chart size

TzeYiing3faa9edd3da4
diff --git a/studio/components/interfaces/Settings/Logs/LogEventChart.tsx b/studio/components/interfaces/Settings/Logs/LogEventChart.tsx
index 49c6b5055c7..47259e9e730 100644
--- a/studio/components/interfaces/Settings/Logs/LogEventChart.tsx
+++ b/studio/components/interfaces/Settings/Logs/LogEventChart.tsx
@@ -17,7 +17,7 @@ const LogEventChart: React.FC<Props> = ({ data, onBarClick }) => {
return (
<BarChart
minimalHeader
- minmalChart
+ chartSize="tiny"
data={aggregated}
attribute="count"
label="Events"
diff --git a/studio/components/to-be-cleaned/Charts/ChartRenderer.tsx b/studio/components/to-be-cleaned/Charts/ChartRenderer.tsx
index 6f668d0420f..0733e94b6f7 100644
--- a/studio/components/to-be-cleaned/Charts/ChartRenderer.tsx
+++ b/studio/components/to-be-cleaned/Charts/ChartRenderer.tsx
@@ -175,10 +175,10 @@ export function BarChart({
label,
onBarClick,
minimalHeader,
- minimalChart,
+ chartSize = 'normal',
className = '',
noDataTitle,
- noDataMessage
+ noDataMessage,
}: any) {
const hasData = data ? dataCheck(data, attribute) : true
@@ -203,7 +203,11 @@ export function BarChart({
const day = (value: number | string) => (displayDateInUtc ? dayjs(value).utc() : dayjs(value))
// For future reference: https://github.com/supabase/supabase/pull/5311#discussion_r800852828
- const chartHeight = minimalChart ? 96 : 160
+ const chartHeight = {
+ tiny: 76,
+ small: 96,
+ normal: 160,
+ }[chartSize as string] as number
return (
<Loading active={!data}>
@@ -293,7 +297,7 @@ export function BarChart({
)}
</>
) : (
- <NoData title={noDataTitle} message={noDataMessage}/>
+ <NoData title={noDataTitle} message={noDataMessage} />
)}
</div>
</div>