style: adjust chart margins and tick gap
This commit is contained in:
+2
-2
@@ -126,7 +126,7 @@ function ChartContainer({name, data, lastFormatter, loading, children, topMargin
|
|||||||
<h2>{name}: {loading ? 'Loading...' : last || 'No data'}</h2>
|
<h2>{name}: {loading ? 'Loading...' : last || 'No data'}</h2>
|
||||||
|
|
||||||
<ResponsiveContainer width='100%' height={300}>
|
<ResponsiveContainer width='100%' height={300}>
|
||||||
<ComposedChart syncId={1} data={data} margin={{ top: topMargin, left: 0, right: 30, bottom: 0 }}>
|
<ComposedChart syncId={1} data={data} margin={{ top: topMargin, left: 0, right: 10, bottom: 0 }}>
|
||||||
{children}
|
{children}
|
||||||
</ComposedChart>
|
</ComposedChart>
|
||||||
</ResponsiveContainer>
|
</ResponsiveContainer>
|
||||||
@@ -148,7 +148,7 @@ function SolarPower({end, duration}) {
|
|||||||
>
|
>
|
||||||
<XAxis
|
<XAxis
|
||||||
dataKey='time'
|
dataKey='time'
|
||||||
minTickGap={5}
|
minTickGap={0}
|
||||||
tickFormatter={tickFormatter}
|
tickFormatter={tickFormatter}
|
||||||
ticks={ticks}
|
ticks={ticks}
|
||||||
/>
|
/>
|
||||||
|
|||||||
Reference in New Issue
Block a user