Update Area Chart docs and proptype

This commit is contained in:
Alex Holliday committed 2024-11-19 13:34:43 +08:00
1 parent 924c799858
commit 6a0d61b73e
1 file changed
+12 -4
@@ -47,14 +47,22 @@ import { useTheme } from "@mui/material";
* data={data} * data={data}
* xKey="createdAt" * xKey="createdAt"
* yKey="cpu.usage_percent" * yKey="cpu.usage_percent"
* xTick={TzTick} * xTick={<TzTick />}
* yTick={PercentTick} * yTick={<PercentTick />}
* strokeColor="#8884d8" * strokeColor="#8884d8"
* fillColor="#8884d8" * fillColor="#8884d8"
* gradient={true} * gradient={true}
* gradientStartColor="#8884d8" * gradientStartColor="#8884d8"
* gradientEndColor="#82ca9d" * gradientEndColor="#82ca9d"
* customTooltip={InfrastructureTooltip} * customTooltip={({ active, payload, label }) => (
* <InfrastructureTooltip
* label={label?.toString() ?? ""}
* yKey="cpu.usage_percent"
* yLabel="CPU Usage"
* active={active}
* payload={payload}
* />
* )}
* /> * />
* ); * );
* }; * };
@@ -138,7 +146,7 @@ CustomAreaChart.propTypes = {
gradientDirection: PropTypes.string, gradientDirection: PropTypes.string,
gradientStartColor: PropTypes.string, gradientStartColor: PropTypes.string,
gradientEndColor: PropTypes.string, gradientEndColor: PropTypes.string,
customTooltip: PropTypes.object, customTooltip: PropTypes.func,
}; };
export default CustomAreaChart; export default CustomAreaChart;