Skip to content

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

Resolve merge conflict

Joshen Lim81de2b6adf96
diff --cc www/pages/beta.tsx
index 9d29ba30d56,f1af3caa142..2a4ab1c1467
--- a/www/pages/beta.tsx
+++ b/www/pages/beta.tsx
@@@ -97,23 -97,32 +97,24 @@@ const Performance = () =>
const readColors = ["#38BC81", "red"]
const writeColors = ["#65D9A5", "pink"]
-- type labelProps = {
- x?: any,
- y?: any,
- width?: any,
- height?: any,
- x: number,
- y: number,
- width: number,
- height: number,
-- text?: string,
-- }
--
- const renderCustomizedLabel = (props: labelProps) => {
- const { x, y, width, text } = props;
- const radius = 10;
-
+ function renderCustomizedLabel(props: any): any {
+ const { width, text } = props
+ const radius = 10
+
+ let x: number = props.x + width / 2
+ let y: number = props.y - radius
return (
- <text x={x + width / 2} y={y - radius} fill="#000" textAnchor="middle" dominantBaseline="middle" fontSize={14}>
+ <text
+ x={x}
+ y={y}
+ fill="#000"
+ textAnchor="middle"
+ dominantBaseline="middle"
+ fontSize={14}
+ >
- Read
+ {text}
</text>
- );
+ )
};
// Documentation on recharts:
@@@ -131,30 -140,18 +132,30 @@@
style={{ textAnchor: 'middle' }}
/>
</YAxis>
- <Tooltip />
- {/* <Legend /> */}
+ <Tooltip cursor={{ fill: 'rgba(0, 0, 0, 0.05)'}} />
<Bar dataKey="read" name="Read" barSize={20} unit=" requests/s">
- {PerformanceComparisonData.map((entry: any, idx: number) =>(
+ {PerformanceComparisonData.map((entry: any, idx: number) => (
<Cell key={`cell_${idx}`} fill={readColors[idx]} />
))}
- <LabelList dataKey="name" content={renderCustomizedLabel} />
+ {/* @ts-ignore */}
+ <LabelList content={(props) => {
+ const updatedProps = { ...props, text: "Read"}
+ return renderCustomizedLabel(updatedProps)
+ }}
+ position="top"
+ />
</Bar>
<Bar dataKey="write" name="Write" barSize={20} unit=" requests/s">
- {PerformanceComparisonData.map((entry: any, idx: number) =>(
+ {PerformanceComparisonData.map((entry: any, idx: number) => (
<Cell key={`cell_${idx}`} fill={writeColors[idx]} />
))}
+ {/* @ts-ignore */}
+ <LabelList content={(props) => {
+ const updatedProps = { ...props, text: "Write"}
+ return renderCustomizedLabel(updatedProps)
+ }}
+ position="top"
+ />
</Bar>
</BarChart>
</ResponsiveContainer>