diff --git a/src/components/panels/AveragesPerSessionGraph.tsx b/src/components/panels/AveragesPerSessionGraph.tsx
index 9bf513d..7727520 100644
--- a/src/components/panels/AveragesPerSessionGraph.tsx
+++ b/src/components/panels/AveragesPerSessionGraph.tsx
@@ -8,14 +8,14 @@ import {
export type YFieldValue = string | number | null | undefined;
export type ClubDataForTable =
| {
- x: string | null | undefined;
- y: YFieldValue;
- }[]
+ x: string | null | undefined;
+ y: YFieldValue;
+ }[]
| {
- x: string | null | undefined;
- y: YFieldValue;
- club: string;
- }[];
+ x: string | null | undefined;
+ y: YFieldValue;
+ club: string;
+ }[];
export const AveragesPerSessionGraph = ({
yField,
@@ -61,9 +61,26 @@ export const AveragesPerSessionGraph = ({
title: "Club",
};
}
+
+ const specForMobile: VisualizationSpec = {
+ ...spec,
+ // Don't show action buttons on mobile
+ config: {
+ view: { stroke: "transparent" },
+ legend: {
+ orient: "bottom",
+ },
+ },
+ };
+
return (
);
};
diff --git a/src/components/panels/ShotDispersion.tsx b/src/components/panels/ShotDispersion.tsx
index 187a2e3..cc5b3fc 100644
--- a/src/components/panels/ShotDispersion.tsx
+++ b/src/components/panels/ShotDispersion.tsx
@@ -41,13 +41,27 @@ export const ShotDispersion = () => {
},
};
+ const specForMobile: VisualizationSpec = {
+ ...spec,
+ // Don't show action buttons on mobile
+ config: {
+ view: { stroke: "transparent" },
+ legend: {
+ orient: "bottom",
+ },
+ },
+ };
+
return (
Shot Dispersion
-
);
};
diff --git a/src/components/panels/ShotScatterPlot.tsx b/src/components/panels/ShotScatterPlot.tsx
index 4b05395..7cf364a 100644
--- a/src/components/panels/ShotScatterPlot.tsx
+++ b/src/components/panels/ShotScatterPlot.tsx
@@ -80,6 +80,17 @@ export const ShotScatterPlot = () => {
},
};
+ const specForMobile: VisualizationSpec = {
+ ...spec,
+ // Don't show action buttons on mobile
+ config: {
+ view: { stroke: "transparent" },
+ legend: {
+ orient: "bottom",
+ },
+ },
+ };
+
const clubs: {
[key: string]: GolfSwingData[];
} = useMemo(() => {
@@ -170,9 +181,12 @@ export const ShotScatterPlot = () => {
-
);
};