Adjust interval settings, use avg air data
This commit is contained in:
+9
-13
@@ -9,14 +9,10 @@ import './App.css';
|
|||||||
let tzcache = {};
|
let tzcache = {};
|
||||||
|
|
||||||
const durations = [
|
const durations = [
|
||||||
{id: 0, len: 'Day', win: '10m', full: '10 min', delta: [1, 'days'], format: 'HH'},
|
{id: 0, len: 'Day', win: '5m', full: '5 min', delta: [1, 'days'], format: 'HH'},
|
||||||
{id: 1, len: 'Day', win: '1h', full: '1 hour', delta: [1, 'days'], format: 'HH'},
|
{id: 1, len: 'Week', win: '30m', full: '30 min', delta: [7, 'days'], format: 'HH'},
|
||||||
{id: 2, len: 'Week', win: '1h', full: '1 hour', delta: [7, 'days'], format: 'HH'},
|
{id: 2, len: 'Month', win: '2h', full: '2 hour', delta: [1, 'months'], format: 'D'},
|
||||||
{id: 3, len: 'Week', win: '1d', full: '1 day', delta: [7, 'days'], format: 'D'},
|
{id: 3, len: 'Year', win: '1d', full: '1 day', delta: [1, 'years'], format: 'M/D'},
|
||||||
{id: 4, len: 'Month', win: '1d', full: '1 day', delta: [1, 'months'], format: 'D'},
|
|
||||||
{id: 5, len: 'Month', win: '7d', full: '7 day', delta: [1, 'months'], format: 'D'},
|
|
||||||
{id: 6, len: 'Year', win: '1d', full: '1 day', delta: [1, 'years'], format: 'M/D'},
|
|
||||||
{id: 7, len: 'Year', win: '30d', full: '30 day', delta: [1, 'years'], format: 'M'},
|
|
||||||
];
|
];
|
||||||
|
|
||||||
const units = {
|
const units = {
|
||||||
@@ -501,7 +497,7 @@ function Air({name, sensorName, end, duration}) {
|
|||||||
<ChartContainer
|
<ChartContainer
|
||||||
name={name}
|
name={name}
|
||||||
data={data}
|
data={data}
|
||||||
lastFormatter={(x) => x.max_p10?.toFixed(1) + ' ug/m³'}
|
lastFormatter={(x) => x.p10?.toFixed(1) + ' ug/m³'}
|
||||||
loading={loading}
|
loading={loading}
|
||||||
>
|
>
|
||||||
<XAxis
|
<XAxis
|
||||||
@@ -539,7 +535,7 @@ function Air({name, sensorName, end, duration}) {
|
|||||||
<Line
|
<Line
|
||||||
yAxisId='pm'
|
yAxisId='pm'
|
||||||
type='monotone'
|
type='monotone'
|
||||||
dataKey='max_p10'
|
dataKey='p10'
|
||||||
name='PM10'
|
name='PM10'
|
||||||
stroke='black'
|
stroke='black'
|
||||||
strokeWidth={2}
|
strokeWidth={2}
|
||||||
@@ -550,7 +546,7 @@ function Air({name, sensorName, end, duration}) {
|
|||||||
<Line
|
<Line
|
||||||
yAxisId='pm'
|
yAxisId='pm'
|
||||||
type='monotone'
|
type='monotone'
|
||||||
dataKey='max_p25'
|
dataKey='p25'
|
||||||
name='PM2.5'
|
name='PM2.5'
|
||||||
stroke='red'
|
stroke='red'
|
||||||
strokeWidth={2}
|
strokeWidth={2}
|
||||||
@@ -561,7 +557,7 @@ function Air({name, sensorName, end, duration}) {
|
|||||||
<Line
|
<Line
|
||||||
yAxisId='co2'
|
yAxisId='co2'
|
||||||
type='monotone'
|
type='monotone'
|
||||||
dataKey='max_co2'
|
dataKey='co2'
|
||||||
name='CO2'
|
name='CO2'
|
||||||
stroke='blue'
|
stroke='blue'
|
||||||
strokeWidth={2}
|
strokeWidth={2}
|
||||||
@@ -572,7 +568,7 @@ function Air({name, sensorName, end, duration}) {
|
|||||||
<Line
|
<Line
|
||||||
yAxisId='voc'
|
yAxisId='voc'
|
||||||
type='monotone'
|
type='monotone'
|
||||||
dataKey='max_voc'
|
dataKey='voc'
|
||||||
name='VOC'
|
name='VOC'
|
||||||
stroke='green'
|
stroke='green'
|
||||||
strokeWidth={2}
|
strokeWidth={2}
|
||||||
|
|||||||
Reference in New Issue
Block a user