Skip to content

Commit

Permalink
fix: implicit anys
Browse files Browse the repository at this point in the history
I don't know why it doesn't complain about other files.
I don't know why the server check failed. Works on my machine.
  • Loading branch information
nyairobi committed Dec 10, 2024
1 parent 3a8ad3b commit f8d00c8
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions client/src/components/charts/OngekiScoreChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const typeSpecificParams = (t: "Score" | "Bells" | "Life", maxBells: number) =>
gridYValues: [970000, 980000, 990000, 1000000, 1007500, 1010000],
colors: COLOUR_SET.blue,
areaBaselineValue: 970000,
tooltip: (d) => (
tooltip: (d: any) => (
<ChartTooltip>
{d.point.data.y === 970000 ? "≤ " : ""}
{d.point.data.yFormatted} @ {formatTime(d.point.data.x)}
Expand All @@ -50,10 +50,10 @@ const typeSpecificParams = (t: "Score" | "Bells" | "Life", maxBells: number) =>
return {
yScale: { type: "linear", min: minBells, max: 0, stacked: false },
enableGridY: false,
axisLeft: { format: (e) => Math.floor(e) === e && e },
axisLeft: { format: (e: number) => Math.floor(e) === e && e },
colors: COLOUR_SET.vibrantYellow,
areaBaselineValue: minBells,
tooltip: (d) => (
tooltip: (d: any) => (
<ChartTooltip>
MAX{d.point.data.y === 0 ? "" : d.point.data.y} @{" "}
{formatTime(d.point.data.x)}
Expand All @@ -65,14 +65,16 @@ const typeSpecificParams = (t: "Score" | "Bells" | "Life", maxBells: number) =>
colors: COLOUR_SET.green,
enableGridY: false,
yScale: { type: "linear", min: 0, max: 100 },
axisLeft: { format: (d) => `${d}%` },
axisLeft: { format: (d: number) => `${d}%` },
areaBaselineValue: 0,
tooltip: (d) => (
tooltip: (d: any) => (
<ChartTooltip>
{d.point.data.y}% @ {formatTime(d.point.data.x)}
</ChartTooltip>
),
};
default:
return {};
}
};

Expand Down Expand Up @@ -116,11 +118,11 @@ export default function OngekiScoreChart({
useMesh={true}
enableGridX={false}
theme={TACHI_LINE_THEME}
axisBottom={{ format: (d) => formatTime(d) }}
axisBottom={{ format: (d: number) => formatTime(d) }}
curve="linear"
legends={[]}
enableArea
{...typeSpecificParams(type, maxBells)}
{...(typeSpecificParams(type, maxBells) as any)}
/>
);

Expand Down

0 comments on commit f8d00c8

Please sign in to comment.