Changed Chart Labels

This commit is contained in:
2025-11-29 14:25:26 -05:00
parent 95b3ce9e29
commit 2dacc47801
3 changed files with 7 additions and 10 deletions

View File

@@ -11,7 +11,7 @@ import {
import { LineChartArr } from "@/types/LineChartStats";
interface LineChartComponentProps {
label: "Triggers" | "Links Deleted" | "Commands";
label: "Times Triggered" | "Links Deleted" | "Command Responses";
data: LineChartArr;
}
@@ -32,14 +32,14 @@ const LineChartComponent = ({
// axisLine={false}
dataKey={chart.key("day")}
stroke={chart.color("border")}
label={{ value: "Day", position: "bottom" }}
// label={{ value: "Day", position: "bottom" }}
/>
<YAxis
// axisLine={false}
tickLine={false}
tickMargin={10}
stroke={chart.color("border")}
label={{ value: label, position: "left", angle: -90 }}
// label={{ value: label, position: "left", angle: -90 }}
/>
<Tooltip
animationDuration={100}

View File

@@ -2,7 +2,6 @@ import { DailyStats } from "@/types/DailyStats";
import { LineChartArr, LineChartItem } from "@/types/LineChartStats";
const lineChartArr = (dailyStatsArr: DailyStats): LineChartArr => {
console.log(dailyStatsArr);
const lineChartArr = [] as LineChartArr;
if (dailyStatsArr.length) {
@@ -17,16 +16,14 @@ const lineChartArr = (dailyStatsArr: DailyStats): LineChartArr => {
const lineChartItem: LineChartItem = {
day,
"Links Deleted": linksDeleted,
Commands: commandResponses,
Triggers: timesTriggered
"Command Responses": commandResponses,
"Times Triggered": timesTriggered
};
lineChartArr.push(lineChartItem);
});
}
console.log(lineChartArr);
return lineChartArr;
};

View File

@@ -1,8 +1,8 @@
export interface LineChartItem {
day: number;
"Links Deleted": number;
Commands: number;
Triggers: number;
"Command Responses": number;
"Times Triggered": number;
}
export type LineChartArr = LineChartItem[];