summaryrefslogtreecommitdiff
path: root/src/components/MemoryChart.tsx
diff options
context:
space:
mode:
authorcubemaze <[email protected]>2023-05-10 15:25:47 +0800
committercubemaze <[email protected]>2023-05-11 09:37:45 +0800
commitbbc9aac92a582ba7a19b06bb98f975ba5eb90713 (patch)
treebca1ffed6347ad6a26f834c40098a78dd251edd3 /src/components/MemoryChart.tsx
parentc901c585b044d956f8905998e78bcdb09ab7a68c (diff)
chore: homepage style
Diffstat (limited to 'src/components/MemoryChart.tsx')
-rw-r--r--src/components/MemoryChart.tsx15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/components/MemoryChart.tsx b/src/components/MemoryChart.tsx
index 9f6febb..6d750e4 100644
--- a/src/components/MemoryChart.tsx
+++ b/src/components/MemoryChart.tsx
@@ -18,9 +18,18 @@ const { useMemo } = React;
const chartWrapperStyle = {
// make chartjs chart responsive
+ justifySelf: 'center',
position: 'relative',
- maxWidth: 1000,
- marginTop: '1em',
+ width: '100%',
+ height: '200px',
+ borderTop: '2px solid #424242',
+};
+
+const canvasWrapperStyle = {
+ width: '100%',
+ height: '100%',
+ padding: '10px',
+ backgroundColor: 'rgb(26 26 26)',
};
const mapState = (s: State) => ({
@@ -55,7 +64,7 @@ function MemoryChart({ apiConfig, selectedChartStyleIndex }) {
return (
// @ts-expect-error ts-migrate(2322) FIXME: Type '{ position: string; maxWidth: number; }' is ... Remove this comment to see the full error message
<div style={chartWrapperStyle}>
- <canvas id="MemoryChart" />
+ <canvas id="MemoryChart" style={canvasWrapperStyle} />
</div>
);
}