Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion frontend/src/components/charts/bosco/GctFlightChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,12 @@ export const GctFlightChart = ({ runId }: ChartProps) => {
<Legend
verticalAlign="bottom"
align="center"
wrapperStyle={{ paddingTop: 40, fontSize: 11, paddingLeft: 60 }}
wrapperStyle={{
paddingTop: 40,
fontSize: 11,
paddingLeft: 60,
color: chartColors.foreground,
}}
iconType="circle"
iconSize={8}
/>
Expand Down
22 changes: 9 additions & 13 deletions frontend/src/components/charts/hurdles/HurdleTimelineChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,7 @@ import {
} from "recharts";
import { useState } from "react";

const COLORS = {
left: "#f97316",
right: "#000000",
hurdles: "#ef4444",
} as const;
const HURDLE_COLOR = "#ef4444";

const TOGGLE_STYLE = (active: boolean) =>
`px-3 py-1.5 rounded-xl text-xs font-semibold border transition-colors ${
Expand Down Expand Up @@ -149,13 +145,13 @@ export const HurdleTimelineChart = ({
"Left Foot",
showLeft,
() => setShowLeft((v) => !v),
COLORS.left
chartColors.leftFoot
)}
{toggleBtn(
"Right Foot",
showRight,
() => setShowRight((v) => !v),
COLORS.right
chartColors.rightFoot
)}
</div>

Expand Down Expand Up @@ -211,12 +207,12 @@ export const HurdleTimelineChart = ({
<ReferenceLine
key={m.hurdle_num}
x={m.time_s}
stroke={COLORS.hurdles}
stroke={HURDLE_COLOR}
strokeDasharray="4 3"
label={{
value: `H${m.hurdle_num}`,
position: "top",
fill: COLORS.hurdles,
fill: HURDLE_COLOR,
fontSize: 10,
}}
/>
Expand All @@ -226,9 +222,9 @@ export const HurdleTimelineChart = ({
<Line
type="basis"
dataKey="left"
stroke={COLORS.left}
stroke={chartColors.leftFoot}
strokeWidth={2}
dot={makeFootDot(COLORS.left)}
dot={makeFootDot(chartColors.leftFoot)}
connectNulls={false}
name="Left"
/>
Expand All @@ -237,9 +233,9 @@ export const HurdleTimelineChart = ({
<Line
type="basis"
dataKey="right"
stroke={COLORS.right}
stroke={chartColors.rightFoot}
strokeWidth={2}
dot={makeFootDot(COLORS.right)}
dot={makeFootDot(chartColors.rightFoot)}
connectNulls={false}
name="Right"
/>
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/charts/hurdles/SplitScoreChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ export const SplitScoreChart = ({
verticalAlign="top"
align="right"
iconType="line"
wrapperStyle={{ fontSize: 11 }}
wrapperStyle={{ fontSize: 11, color: chartColors.foreground }}
/>

{/* 10th–90th percentile band — outer, light */}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,12 @@ export const ApproachProfileChart = ({ runId }: ChartProps) => {
<Legend
verticalAlign="bottom"
align="center"
wrapperStyle={{ paddingTop: 40, fontSize: 11, paddingLeft: 60 }}
wrapperStyle={{
paddingTop: 40,
fontSize: 11,
paddingLeft: 60,
color: chartColors.foreground,
}}
iconType="circle"
iconSize={8}
formatter={(v) => (v === "left" ? "Left Foot" : "Right Foot")}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,12 @@ export const LjFlightTimeChart = ({ runId }: ChartProps) => {
<Legend
verticalAlign="bottom"
align="center"
wrapperStyle={{ paddingTop: 40, fontSize: 11, paddingLeft: 60 }}
wrapperStyle={{
paddingTop: 40,
fontSize: 11,
paddingLeft: 60,
color: chartColors.foreground,
}}
iconType="circle"
iconSize={8}
formatter={(v) => (v === "left" ? "Left Foot" : "Right Foot")}
Expand Down
7 changes: 6 additions & 1 deletion frontend/src/components/charts/long_jump/LjGctChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,12 @@ export const LjGctChart = ({ runId }: ChartProps) => {
<Legend
verticalAlign="bottom"
align="center"
wrapperStyle={{ paddingTop: 40, fontSize: 11, paddingLeft: 60 }}
wrapperStyle={{
paddingTop: 40,
fontSize: 11,
paddingLeft: 60,
color: chartColors.foreground,
}}
iconType="circle"
iconSize={8}
formatter={(value) =>
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/components/charts/shared/CustomToolTip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ export const FlightTimeChart = ({ runId }: { runId: string }) => {
<Legend
verticalAlign="bottom"
align="center"
wrapperStyle={{ paddingTop: 40, fontSize: 11, paddingLeft: 60 }}
wrapperStyle={{ paddingTop: 40, fontSize: 11, paddingLeft: 60, color: chartColors.foreground }}
iconType="circle"
iconSize={8}
/>
Expand Down Expand Up @@ -282,7 +282,7 @@ export const StepTimeChart = ({ runId }: { runId: string }) => {
<Legend
verticalAlign="bottom"
align="center"
wrapperStyle={{ paddingTop: 40, fontSize: 11, paddingLeft: 40 }}
wrapperStyle={{ paddingTop: 40, fontSize: 11, paddingLeft: 40, color: chartColors.foreground }}
iconType="circle"
iconSize={8}
/>
Expand Down
9 changes: 7 additions & 2 deletions frontend/src/components/charts/shared/LROverlayLineChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,12 @@ export const LROverlayLineChart = ({
<Legend
verticalAlign="bottom"
align="center"
wrapperStyle={{ paddingTop: 40, fontSize: 11, paddingLeft: 60 }}
wrapperStyle={{
paddingTop: 40,
fontSize: 11,
paddingLeft: 60,
color: chartColors.foreground,
}}
iconType="circle"
iconSize={8}
/>
Expand All @@ -177,7 +182,7 @@ export const LROverlayLineChart = ({
<Line
type="monotone"
dataKey="right"
stroke={chartColors.foreground}
stroke={chartColors.rightFoot}
strokeWidth={2}
name="Right Foot"
dot={false}
Expand Down
7 changes: 6 additions & 1 deletion frontend/src/components/charts/sprint/StepFrequencyChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,12 @@ export const StepFrequencyChart = ({ runId }: ChartProps) => {
<Legend
verticalAlign="bottom"
align="center"
wrapperStyle={{ paddingTop: 40, fontSize: 11, paddingLeft: 60 }}
wrapperStyle={{
paddingTop: 40,
fontSize: 11,
paddingLeft: 60,
color: chartColors.foreground,
}}
iconType="circle"
iconSize={8}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,12 @@ export const TjPhaseTimelineChart = ({ runId }: ChartProps) => {
<Legend
verticalAlign="bottom"
align="center"
wrapperStyle={{ paddingTop: 40, fontSize: 11, paddingLeft: 60 }}
wrapperStyle={{
paddingTop: 40,
fontSize: 11,
paddingLeft: 60,
color: chartColors.foreground,
}}
iconType="circle"
iconSize={8}
formatter={(v) => (v === dataKeys.left ? "Left Foot" : "Right Foot")}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { QueryLoading } from "@/components/ui/QueryLoading";
import { QueryError } from "@/components/ui/QueryError";
import type { ChartProps } from "@/types/chart.types";
import { ChartCard } from "@/components/charts/shared/ChartCard";
import { chartColors } from "@/lib/chartColors";
import {
PieChart,
Pie,
Expand Down Expand Up @@ -108,7 +109,7 @@ export const GCTRangePieChart = ({ runId }: ChartProps) => {
<Legend
iconType="circle"
iconSize={8}
wrapperStyle={{ fontSize: 12 }}
wrapperStyle={{ fontSize: 12, color: chartColors.foreground }}
/>
</PieChart>
</ResponsiveContainer>
Expand Down
7 changes: 6 additions & 1 deletion frontend/src/components/charts/universal/StepTimeChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,12 @@ export const StepTimeChart = ({ runId }: { runId: string }) => {
<Legend
verticalAlign="bottom"
align="center"
wrapperStyle={{ paddingTop: 40, fontSize: 11, paddingLeft: 40 }}
wrapperStyle={{
paddingTop: 40,
fontSize: 11,
paddingLeft: 40,
color: chartColors.foreground,
}}
iconType="circle"
iconSize={8}
/>
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/lib/chartColors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export const chartColors = {
foreground: "hsl(var(--foreground))",
primaryLight: "hsl(var(--primary) / 0.2)",
leftFoot: "#f97316",
rightFoot: "#000000",
rightFoot: "hsl(var(--foreground))",
phaseApproach: "#000000",
phaseAntepenultimate: "#facc15",
phasePenultimate: "#ef4444",
Expand Down
Loading
Loading