Rows Per Table
@@ -177,7 +189,7 @@ type TheBarChartProps = {
}[];
};
-const compactrer = Intl.NumberFormat("en-US", {
+const compactNumberFormatter = Intl.NumberFormat("en-US", {
notation: "compact",
maximumFractionDigits: 1,
});
@@ -198,7 +210,7 @@ export function TheBarChart({ counts }: TheBarChartProps) {
fontSize={12}
tickLine={false}
axisLine={false}
- tickFormatter={(number) => compactrer.format(number)}
+ tickFormatter={(number) => compactNumberFormatter.format(number)}
/>
+ } cursor={{ fill: "#00ffa61e" }} />
);
@@ -233,3 +246,26 @@ function IndexSkeleton() {
>
);
}
+
+function CustomTooltip({
+ active,
+ payload,
+ label,
+}: TooltipProps) {
+ if (!active || !payload || !payload.length) return null;
+
+ return (
+
+
+ # {payload[0]?.value?.toLocaleString()}
+
+ Table {label} have{" "}
+
+ {compactNumberFormatter.format(payload[0]?.value as number)}
+ {" "}
+ rows.
+
+
+
+ );
+}
diff --git a/ui/src/routes/tables.lazy.tsx b/ui/src/routes/tables.lazy.tsx
index bfaa66e..916cd86 100644
--- a/ui/src/routes/tables.lazy.tsx
+++ b/ui/src/routes/tables.lazy.tsx
@@ -41,7 +41,7 @@ function Tables() {
{data.tables.map((n, i) => (
- {n.name} ({n.count.toLocaleString()})
+ {n.name} [{n.count.toLocaleString()}]
))}
@@ -140,6 +140,12 @@ function Table({ name }: Props) {
language="sql"
theme={currentTheme === "dark" ? CodeDarkTheme : undefined}
showLineNumbers={false}
+ customStyle={{
+ FontFace: "JetBrains Mono",
+ padding: "10px",
+ backgroundColor: currentTheme === "dark" ? "#091813" : "#f5faf9",
+ borderRadius: "10px",
+ }}
/>
diff --git a/ui/tailwind.config.js b/ui/tailwind.config.js
index 0730ff9..5d567c9 100644
--- a/ui/tailwind.config.js
+++ b/ui/tailwind.config.js
@@ -9,6 +9,9 @@ module.exports = {
],
prefix: "",
theme: {
+ fontFamily: {
+ mono: ["JetBrains Mono"],
+ },
container: {
center: true,
padding: "2rem",