Skip to content

Commit d411264

Browse files
committed
Speedup sluggish animation
1 parent 799b63e commit d411264

4 files changed

Lines changed: 10 additions & 10 deletions

File tree

web/src/features/sensors/ambient/Ambient.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ const AmbientChart = ({}) => {
1919
<YAxis yAxisId={`tempYaxis-${id}`} />
2020
<YAxis yAxisId={`humidityYaxis-${id}`} orientation='right' />
2121
<Legend onClick={({dataKey}) => setSelected(selected !== dataKey ? dataKey : null)}/>
22-
{ shouldShow('temperature') && <Line yAxisId={`tempYaxis-${id}`} type="monotone" dataKey="temperature" stroke="#8884d8" /> }
23-
{ shouldShow('humidity') && <Line yAxisId={`humidityYaxis-${id}`} type="monotone" dataKey="humidity" stroke="#2284d8" /> }
24-
{ shouldShow('dewpoint') && <Line yAxisId={`tempYaxis-${id}`} type="monotone" dataKey="dewpoint" stroke="#8822d8" /> }
22+
{ shouldShow('temperature') && <Line animationDuration={100} yAxisId={`tempYaxis-${id}`} type="monotone" dataKey="temperature" stroke="#8884d8" /> }
23+
{ shouldShow('humidity') && <Line animationDuration={100} yAxisId={`humidityYaxis-${id}`} type="monotone" dataKey="humidity" stroke="#2284d8" /> }
24+
{ shouldShow('dewpoint') && <Line animationDuration={100} yAxisId={`tempYaxis-${id}`} type="monotone" dataKey="dewpoint" stroke="#8822d8" /> }
2525

2626
</LineChart>
2727
</ResponsiveContainer>

web/src/features/sensors/heaters/Heaters.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ const HeatersChart = ({}) => {
5656

5757
</Col>
5858
</Form.Group>
59-
</Form>
59+
</Form>//MLin
6060

6161
{activeHeater !== null &&
6262
<div style={{ height: 400 }}>
@@ -67,8 +67,8 @@ const HeatersChart = ({}) => {
6767
<YAxis yAxisId={`tempYAxis-${id}`} />
6868
<YAxis yAxisId={`dutyYAxis-${id}`} orientation='right' />
6969
<Legend onClick={({dataKey}) => setSelected(selected !== dataKey ? dataKey : null)}/>
70-
{shouldShow(`heater-${activeHeater}-temperature`) && <Line name={`Heater ${activeHeater} temperature`} yAxisId={`tempYAxis-${id}`} type="monotone" dataKey={`heater-${activeHeater}-temperature`} stroke="#ffaa22" />}
71-
{shouldShow(`heater-${activeHeater}-duty`) && <Line name={`Heater ${activeHeater} duty`} yAxisId={`dutyYAxis-${id}`} type="monotone" dataKey={`heater-${activeHeater}-duty`} stroke="#22aaff" />}
70+
{shouldShow(`heater-${activeHeater}-temperature`) && <Line animationDuration={100} name={`Heater ${activeHeater} temperature`} yAxisId={`tempYAxis-${id}`} type="monotone" dataKey={`heater-${activeHeater}-temperature`} stroke="#ffaa22" />}
71+
{shouldShow(`heater-${activeHeater}-duty`) && <Line animationDuration={100} name={`Heater ${activeHeater} duty`} yAxisId={`dutyYAxis-${id}`} type="monotone" dataKey={`heater-${activeHeater}-duty`} stroke="#22aaff" />}
7272
</LineChart>
7373
</ResponsiveContainer>
7474
</div>

web/src/features/sensors/power/Power.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ const PowerChart= ({}) => {
2020
<YAxis yAxisId={`powerAxis-${id}`} />
2121
<YAxis yAxisId={`currentYAxis-${id}`} orientation='right' />
2222
<Legend onClick={({dataKey}) => setSelected(selected !== dataKey ? dataKey : null)}/>
23-
{ shouldShow('busVoltage') && <Line yAxisId={`voltageAxis-${id}`} type="monotone" dataKey="busVoltage" stroke="#8884d8" /> }
24-
{ shouldShow('current') && <Line yAxisId={`currentYAxis-${id}`} type="monotone" dataKey="current" stroke="#2284d8" /> }
25-
{ shouldShow('power') && <Line yAxisId={`powerAxis-${id}`} type="monotone" dataKey="power" stroke="#8822d8" /> }
23+
{ shouldShow('busVoltage') && <Line animationDuration={100} yAxisId={`voltageAxis-${id}`} type="monotone" dataKey="busVoltage" stroke="#8884d8" /> }
24+
{ shouldShow('current') && <Line animationDuration={100} yAxisId={`currentYAxis-${id}`} type="monotone" dataKey="current" stroke="#2284d8" /> }
25+
{ shouldShow('power') && <Line animationDuration={100} yAxisId={`powerAxis-${id}`} type="monotone" dataKey="power" stroke="#8822d8" /> }
2626

2727
</LineChart>
2828
</ResponsiveContainer>

web/src/setupProxy.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
const { createProxyMiddleware } = require('http-proxy-middleware');
22

33
module.exports = function(app) {
4-
const target = 'http://astropowerbox-prototype.lan'
4+
const target = 'http://astropowerbox-c11.lan'
55
console.log(`****** proxy setup: "/api" => ${target}`)
66
app.use(
77
'/api',

0 commit comments

Comments
 (0)