diff --git a/components/LineGraph.module.css b/components/LineGraph.module.css index 99f208f..fdc3102 100644 --- a/components/LineGraph.module.css +++ b/components/LineGraph.module.css @@ -2,7 +2,7 @@ stroke-width: 4; } -.lineSeries:hover { +.lineSeries hover { filter: drop-shadow(0 0 calc(4rem / 16) var(--primary-accent)); } diff --git a/components/LineGraph.tsx b/components/LineGraph.tsx index d896bd4..31fc183 100644 --- a/components/LineGraph.tsx +++ b/components/LineGraph.tsx @@ -42,7 +42,6 @@ export const LineGraph = ({ xLabelSize = DEFAULT_LABEL_SIZE, yLabelSize = DEFAULT_LABEL_SIZE, }: LineGraphProps) => { - // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-call const customTheme = buildChartTheme({ // colors backgroundColor: Color.secondaryBackground, // used by Tooltip, Annotation @@ -61,73 +60,56 @@ export const LineGraph = ({ const yAccessor = (d: LineGraphData) => d.y; return ( - <> - - { - return { - dy: "0.25rem", - fontSize: `${xLabelSize / 16}rem`, - className: styles.axisLabel, - }; - }} + + { + return { + dy: "0.25rem", + fontSize: `${xLabelSize / 16}rem`, + className: styles.axisLabel, + }; + }} + /> + { + return { + dy: "0.25rem", + className: styles.axisLabel, + fontSize: `${yLabelSize / 16}rem`, + }; + }} + /> + + {data.map((d, i) => ( + - { - return { - dy: "0.25rem", - className: styles.axisLabel, - fontSize: `${yLabelSize / 16}rem`, - }; - }} - /> - - {data.map((d, i) => ( - - ))} - - ( -
-
{tooltipData?.nearestDatum?.key}
-
- {/* {xAccessor(tooltipData.nearestDatum.datum)} - {": "} */} - {yAccessor(tooltipData?.nearestDatum?.datum as LineGraphData)} -
- )} - /> -
- + ))} +
); };