Skip to content

The only tool you need to know what is happening and how to fix it.

more styling work

dduxee4f6b5f9b17
diff --git a/frontend/src/lib/components/dashboard/metric-card.svelte b/frontend/src/lib/components/dashboard/metric-card.svelte
index bac8db02..5f8820ee 100644
--- a/frontend/src/lib/components/dashboard/metric-card.svelte
+++ b/frontend/src/lib/components/dashboard/metric-card.svelte
@@ -327,13 +327,19 @@
seriesLayout="overlap"
axis={true}
rule={true}
- grid={{ x: false, y: true }}
+ grid={{ x: false, y: { style: '--stroke-color: hsl(var(--border));' } }}
props={{
xAxis: {
- format: () => ""
+ format: () => "",
+ rule: true
},
yAxis: {
- format: (a: number) => a > 999 ? (a/1000).toFixed(0) + "k" : `${a}`,
+ format: (a: number) => {
+ if (a >= 1000000) return (a / 1000000).toFixed(1) + "M";
+ if (a >= 1000) return (a / 1000).toFixed(1) + "k";
+ return Number.isInteger(a) ? a.toString() : a.toFixed(1);
+ },
+ rule: true
}
}}
tooltip={false}
@@ -378,13 +384,19 @@
seriesLayout="stack"
axis={true}
rule={true}
- grid={{ x: false, y: true }}
+ grid={{ x: false, y: { style: '--stroke-color: hsl(var(--border));' } }}
props={{
xAxis: {
format: () => "",
+ rule: true
},
yAxis: {
- format: (a: number) => a > 999 ? (a/1000).toFixed(0) + "k" : `${a}`,
+ format: (a: number) => {
+ if (a >= 1000000) return (a / 1000000).toFixed(1) + "M";
+ if (a >= 1000) return (a / 1000).toFixed(1) + "k";
+ return Number.isInteger(a) ? a.toString() : a.toFixed(1);
+ },
+ rule: true
},
spline: {
defined: isDefined
diff --git a/frontend/src/lib/components/ui/chart/chart-container.svelte b/frontend/src/lib/components/ui/chart/chart-container.svelte
index 36c00004..d4599597 100644
--- a/frontend/src/lib/components/ui/chart/chart-container.svelte
+++ b/frontend/src/lib/components/ui/chart/chart-container.svelte
@@ -51,10 +51,8 @@
// chart.
"[&_.lc-axis-tick]:stroke-0",
- // We don't want to display the rule on the x/y axis, as there is already going to be
- // a grid line there and rule ends up overlapping the marks because it is rendered after
- // the marks
- "[&_.lc-rule-x-line:not(.lc-grid-x-rule)]:stroke-0 [&_.lc-rule-y-line:not(.lc-grid-y-rule)]:stroke-0",
+ // Show axis lines (X on bottom, Y on left)
+ "[&_.lc-rule-x-line:not(.lc-grid-x-rule)]:stroke-[#c8cdd4] [&_.lc-rule-y-line:not(.lc-grid-y-rule)]:stroke-[#c8cdd4]",
"[&_.lc-grid-x-radial-line]:stroke-border [&_.lc-grid-x-radial-circle]:stroke-border",
"[&_.lc-grid-y-radial-line]:stroke-border [&_.lc-grid-y-radial-circle]:stroke-border",