Bereichsgrenzen angepasst
Highcharts-Warnunbg unterdrückt
This commit is contained in:
@@ -31,6 +31,9 @@ const WeatherDashboard = ({ data }) => {
|
||||
animation: false,
|
||||
backgroundColor: 'transparent'
|
||||
},
|
||||
accessibility: {
|
||||
enabled: false
|
||||
},
|
||||
credits: {
|
||||
enabled: false
|
||||
},
|
||||
@@ -79,14 +82,15 @@ const WeatherDashboard = ({ data }) => {
|
||||
const min = Math.min(...temps)
|
||||
const max = Math.max(...temps)
|
||||
const range = max - min
|
||||
|
||||
console.log("Range: ", range)
|
||||
let yMin = min
|
||||
let yMax = max
|
||||
|
||||
if (range < 15) {
|
||||
console.log("yMax:",yMax, " yMin:", yMin)
|
||||
if (range < 10) {
|
||||
const center = (max + min) / 2
|
||||
yMin = center - 7.5
|
||||
yMax = center + 7.5
|
||||
yMin = center - 5
|
||||
yMax = center + 5
|
||||
console.log("yMax:",yMax, " yMin:", yMin)
|
||||
}
|
||||
|
||||
return {
|
||||
@@ -150,14 +154,17 @@ const WeatherDashboard = ({ data }) => {
|
||||
const min = Math.min(...pressures)
|
||||
const max = Math.max(...pressures)
|
||||
const range = max - min
|
||||
|
||||
console.log("Range: ", range)
|
||||
|
||||
let yMin = min
|
||||
let yMax = max
|
||||
|
||||
if (range < 50) {
|
||||
console.log("yMax:",yMax, " yMin:", yMin)
|
||||
|
||||
if (range < 40) {
|
||||
const center = (max + min) / 2
|
||||
yMin = center - 25
|
||||
yMax = center + 25
|
||||
yMin = center - 20
|
||||
yMax = center + 20
|
||||
console.log("yMax:",yMax, " yMin:", yMin)
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user