Improve chart text contrast

Use a brighter shared chart theme and a dark styled tooltip, with high-contrast pie slice labels.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
leanderandCopilot committed 2026-10-22 04:47:27 +02:00
1 parent 65e532be30
commit 64b77217f4
5 files changed
+72 -14

No files matched your search

+3 -7
View File
@@ -6,6 +6,7 @@ import { useParams } from "react-router-dom";
import { GQLError } from "../../components/GQLError";
import { SchemaUser as User, UserDetailDocument, SchemaUserProfile as UserProfile } from "../../types";
import { formatMonth, formatTime } from "../../utils/time";
import { chartTheme, chartTooltipStyle } from "../stats/chartTheme";
import styles from "./UserDetail.module.css";
const UserDetail = () => {
@@ -62,6 +63,7 @@ const UserDetail = () => {
<h2>Kjøp over tid</h2>
<Line
data={series}
theme={chartTheme}
width={1000}
height={400}
margin={{ top: 50, right: 110, bottom: 50, left: 60 }}
@@ -88,13 +90,7 @@ const UserDetail = () => {
useMesh
pointLabelYOffset={0}
tooltip={({ point }) => (
<div
style={{
background: "white",
padding: "9px 12px",
border: "1px solid #ccc",
}}
>
<div style={chartTooltipStyle}>
<div>
<strong>{point.data.xFormatted}</strong>
</div>