Skip to content

Commit

Permalink
fix: use day as date in ScatterPlot
Browse files Browse the repository at this point in the history
  • Loading branch information
thraizz committed Jun 2, 2024
1 parent fe414d7 commit 2f7c507
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { getAllDataFromSession } from "../../utils/getAllDataFromSession";
import { BaseLabel } from "../base/BaseLabel";
import { BaseListbox } from "../base/BaseListbox";

export const AveragesScatterPlot = () => {
export const ShotScatterPlot = () => {
const { sessions } = useContext(SessionContext);

const [xField, setXField] = useState("Backspin");
Expand Down Expand Up @@ -118,7 +118,7 @@ export const AveragesScatterPlot = () => {
table: clubs[club].map((row) => ({
x: row[xField as keyof GolfSwingData],
y: row[yField as keyof GolfSwingData],
date: row["Date"] || row["Datum"],
date: (row["Date"] || row["Datum"])?.split(" ")[0],
})),
};
}
Expand Down
4 changes: 2 additions & 2 deletions src/views/Visualization.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { BasePageLayout } from "../components/base/BasePageLayout";
import { AveragesPerSession } from "../components/panels/AveragesPerSession";
import { AveragesScatterPlot } from "../components/panels/AveragesScatterPlot";
import { ShotDispersion } from "../components/panels/ShotDispersion";
import { ShotScatterPlot } from "../components/panels/ShotScatterPlot";

export const Visualization = () => (
<BasePageLayout>
Expand All @@ -10,7 +10,7 @@ export const Visualization = () => (
<ShotDispersion />
<AveragesPerSession />
<hr className="my-6" />
<AveragesScatterPlot />
<ShotScatterPlot />
</div>
</BasePageLayout>
);

0 comments on commit 2f7c507

Please sign in to comment.