From 56e1aee5251c10228bf3bea110b596c2cb9dbdf3 Mon Sep 17 00:00:00 2001 From: Alex Holliday Date: Mon, 25 Nov 2024 10:48:43 +0800 Subject: [PATCH] Add x and y domain as optional values to AreaChart --- Client/src/Components/Charts/AreaChart/index.jsx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Client/src/Components/Charts/AreaChart/index.jsx b/Client/src/Components/Charts/AreaChart/index.jsx index d05dbb14a..d645779ad 100644 --- a/Client/src/Components/Charts/AreaChart/index.jsx +++ b/Client/src/Components/Charts/AreaChart/index.jsx @@ -46,7 +46,9 @@ import { useId } from "react"; * } * yTick={} * strokeColor="#8884d8" @@ -73,7 +75,9 @@ const CustomAreaChart = ({ data, dataKey, xKey, + xDomain, yKey, + yDomain, xTick, yTick, strokeColor, @@ -97,9 +101,11 @@ const CustomAreaChart = ({ @@ -143,7 +149,9 @@ CustomAreaChart.propTypes = { xTick: PropTypes.object, // Recharts takes an instance of component, so we can't pass the component itself yTick: PropTypes.object, // Recharts takes an instance of component, so we can't pass the component itself xKey: PropTypes.string.isRequired, + xDomain: PropTypes.array, yKey: PropTypes.string.isRequired, + yDomain: PropTypes.array, fillColor: PropTypes.string, strokeColor: PropTypes.string, gradient: PropTypes.bool,