style: increase YAxis width and adjust pressure domain in graphs

This commit is contained in:
Tanner
2026-08-26 16:49:37 +00:00
committed by Tanner (aider)
parent 89fbd56517
commit 2ff5837e87
+19 -19
View File
@@ -157,7 +157,7 @@ function SolarPower({end, duration}) {
<YAxis <YAxis
domain={[0, 6000]} domain={[0, 6000]}
width={35} width={40}
ticks={[0, 1000, 2000, 3000, 4000, 5000, 6000]} ticks={[0, 1000, 2000, 3000, 4000, 5000, 6000]}
tickFormatter={(tick) => tick === 0 ? 0 : (tick / 1000) + 'k'} tickFormatter={(tick) => tick === 0 ? 0 : (tick / 1000) + 'k'}
/> />
@@ -208,13 +208,13 @@ function Temperature({name, sensorName, end, duration, yDomain, showHumidity, sh
domain={[0, 100]} domain={[0, 100]}
orientation='right' orientation='right'
hide={true} hide={true}
width={35} width={40}
/> />
} }
<YAxis <YAxis
yAxisId={showHumidity ? 'left' : undefined} yAxisId={showHumidity ? 'left' : undefined}
domain={yDomain} domain={yDomain}
width={35} width={40}
/> />
<CartesianGrid strokeDasharray='3 3'/> <CartesianGrid strokeDasharray='3 3'/>
<Tooltip <Tooltip
@@ -280,12 +280,12 @@ function Thermostat({end, duration}) {
domain={[0, 6]} domain={[0, 6]}
orientation='right' orientation='right'
hide={true} hide={true}
width={35} width={40}
/> />
<YAxis <YAxis
yAxisId='left' yAxisId='left'
domain={[12, 30]} domain={[12, 30]}
width={35} width={40}
/> />
<CartesianGrid strokeDasharray='3 3'/> <CartesianGrid strokeDasharray='3 3'/>
@@ -355,11 +355,11 @@ function Gas({end, duration}) {
domain={data.length ? [data[0].consumption_data, data.slice(-1)[0].consumption_data] : [100, 0]} domain={data.length ? [data[0].consumption_data, data.slice(-1)[0].consumption_data] : [100, 0]}
orientation='right' orientation='right'
hide={true} hide={true}
width={35} width={40}
/> />
<YAxis <YAxis
yAxisId='left' yAxisId='left'
width={35} width={40}
/> />
<CartesianGrid strokeDasharray='3 3'/> <CartesianGrid strokeDasharray='3 3'/>
@@ -416,11 +416,11 @@ function Water({end, duration}) {
domain={data.length ? [data[0].consumption_data, data.slice(-1)[0].consumption_data] : [100, 0]} domain={data.length ? [data[0].consumption_data, data.slice(-1)[0].consumption_data] : [100, 0]}
orientation='right' orientation='right'
hide={true} hide={true}
width={35} width={40}
/> />
<YAxis <YAxis
yAxisId='left' yAxisId='left'
width={35} width={40}
/> />
<CartesianGrid strokeDasharray='3 3'/> <CartesianGrid strokeDasharray='3 3'/>
@@ -473,7 +473,7 @@ function LivingRoomDust({end, duration}) {
/> />
<YAxis <YAxis
domain={[0, 20]} domain={[0, 20]}
width={35} width={40}
/> />
<CartesianGrid strokeDasharray='3 3'/> <CartesianGrid strokeDasharray='3 3'/>
<Tooltip <Tooltip
@@ -519,19 +519,19 @@ function Air({name, sensorName, end, duration}) {
domain={[400, 1000]} domain={[400, 1000]}
orientation='right' orientation='right'
hide={true} hide={true}
width={35} width={40}
/> />
<YAxis <YAxis
yAxisId='voc' yAxisId='voc'
domain={[0, 250]} domain={[0, 250]}
orientation='right' orientation='right'
hide={true} hide={true}
width={35} width={40}
/> />
<YAxis <YAxis
yAxisId='pm' yAxisId='pm'
domain={[0, 20]} domain={[0, 20]}
width={35} width={40}
/> />
<CartesianGrid strokeDasharray='3 3'/> <CartesianGrid strokeDasharray='3 3'/>
@@ -610,7 +610,7 @@ function BedroomSleep({end, duration}) {
/> />
<YAxis <YAxis
domain={[5, 20]} domain={[5, 20]}
width={35} width={40}
/> />
<CartesianGrid strokeDasharray='3 3'/> <CartesianGrid strokeDasharray='3 3'/>
<Tooltip <Tooltip
@@ -654,7 +654,7 @@ function Lux({name, sensorName, end, duration}) {
<YAxis <YAxis
yAxisId='lux' yAxisId='lux'
domain={[0, 250]} domain={[0, 250]}
width={35} width={40}
/> />
<CartesianGrid strokeDasharray='3 3'/> <CartesianGrid strokeDasharray='3 3'/>
@@ -758,7 +758,7 @@ function MultiLineChart({title, measurement, dataKey, sensors, colors, end, dura
loading={loading} loading={loading}
> >
<XAxis dataKey='time' minTickGap={0} tickFormatter={tickFormatter} ticks={ticks} /> <XAxis dataKey='time' minTickGap={0} tickFormatter={tickFormatter} ticks={ticks} />
<YAxis domain={yDomain} width={35} /> <YAxis domain={yDomain} width={40} />
<CartesianGrid strokeDasharray='3 3'/> <CartesianGrid strokeDasharray='3 3'/>
<Tooltip <Tooltip
formatter={(v, name) => v.toFixed(1) + (units[unitKey] || '')} formatter={(v, name) => v.toFixed(1) + (units[unitKey] || '')}
@@ -803,7 +803,7 @@ function Soil({name, sensorName, end, duration}) {
<YAxis <YAxis
yAxisId='soil' yAxisId='soil'
domain={[0, 1000]} domain={[0, 1000]}
width={35} width={40}
/> />
<CartesianGrid strokeDasharray='3 3'/> <CartesianGrid strokeDasharray='3 3'/>
@@ -850,7 +850,7 @@ function WH51Soil({name, sensorName, end, duration}) {
<YAxis <YAxis
yAxisId='soil' yAxisId='soil'
domain={[0, 100]} domain={[0, 100]}
width={35} width={40}
/> />
<CartesianGrid strokeDasharray='3 3'/> <CartesianGrid strokeDasharray='3 3'/>
@@ -916,7 +916,7 @@ function Graphs({end, duration}) {
colors={['black', 'red', 'blue']} colors={['black', 'red', 'blue']}
end={end} end={end}
duration={duration} duration={duration}
yDomain={[87, 91.5]} yDomain={[87, 91]}
unitKey='kPa' unitKey='kPa'
transform={v => v / 10} transform={v => v / 10}
/> />