Bereichsgrenzen angepasst

Highcharts-Warnunbg unterdrückt
This commit is contained in:
rxf
2026-02-08 22:26:10 +01:00
parent 7139619d28
commit c03ffe839d

View File

@@ -31,6 +31,9 @@ const WeatherDashboard = ({ data }) => {
animation: false, animation: false,
backgroundColor: 'transparent' backgroundColor: 'transparent'
}, },
accessibility: {
enabled: false
},
credits: { credits: {
enabled: false enabled: false
}, },
@@ -79,14 +82,15 @@ const WeatherDashboard = ({ data }) => {
const min = Math.min(...temps) const min = Math.min(...temps)
const max = Math.max(...temps) const max = Math.max(...temps)
const range = max - min const range = max - min
console.log("Range: ", range)
let yMin = min let yMin = min
let yMax = max let yMax = max
console.log("yMax:",yMax, " yMin:", yMin)
if (range < 15) { if (range < 10) {
const center = (max + min) / 2 const center = (max + min) / 2
yMin = center - 7.5 yMin = center - 5
yMax = center + 7.5 yMax = center + 5
console.log("yMax:",yMax, " yMin:", yMin)
} }
return { return {
@@ -150,14 +154,17 @@ const WeatherDashboard = ({ data }) => {
const min = Math.min(...pressures) const min = Math.min(...pressures)
const max = Math.max(...pressures) const max = Math.max(...pressures)
const range = max - min const range = max - min
console.log("Range: ", range)
let yMin = min let yMin = min
let yMax = max let yMax = max
console.log("yMax:",yMax, " yMin:", yMin)
if (range < 50) {
if (range < 40) {
const center = (max + min) / 2 const center = (max + min) / 2
yMin = center - 25 yMin = center - 20
yMax = center + 25 yMax = center + 20
console.log("yMax:",yMax, " yMin:", yMin)
} }
return { return {