From ac75abbfe4047dd12c22f47b5ccf375d377f1163 Mon Sep 17 00:00:00 2001 From: Tolu Date: Wed, 1 May 2024 09:45:25 -0400 Subject: [PATCH] Fixed error --- prem-data/src/components/scatter-chart/scatter-chart.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/prem-data/src/components/scatter-chart/scatter-chart.js b/prem-data/src/components/scatter-chart/scatter-chart.js index 42bf5c9..e839b2f 100644 --- a/prem-data/src/components/scatter-chart/scatter-chart.js +++ b/prem-data/src/components/scatter-chart/scatter-chart.js @@ -1,5 +1,7 @@ import { useState, useRef, useEffect } from "react"; import { teamColours } from "../player-tab"; +import { AxisBottom } from "./AxisBottom"; +import { AxisLeft } from './AxisLeft'; import * as d3 from 'd3'; function ScatterGraph({data}){ @@ -11,8 +13,8 @@ function ScatterGraph({data}){ const svgRef = useRef(); const MARGIN = { top: 60, right: 60, bottom: 60, left: 60 }; - const boundsWidth = width - MARGIN.right - MARGIN.left; - const boundsHeight = height - MARGIN.top - MARGIN.bottom; + const boundsWidth = w - MARGIN.right - MARGIN.left; + const boundsHeight = h - MARGIN.top - MARGIN.bottom; const testData = [ {