feat(analogInputsChart): dynamische Linien je Zeitraum (m/i/a/g)
- Chart zeigt für 'Alle Messwerte' (DIA0) Messwert (m), Minimum (i), Maximum (a) - Für 'Stündlich' und 'Täglich' (DIA1/DIA2) werden Minimum (i), Maximum (a), Durchschnitt (g) angezeigt - Farben und Legende entsprechend
This commit is contained in:
@@ -6,6 +6,6 @@ NEXT_PUBLIC_USE_MOCK_BACKEND_LOOP_START=false
|
|||||||
NEXT_PUBLIC_EXPORT_STATIC=false
|
NEXT_PUBLIC_EXPORT_STATIC=false
|
||||||
NEXT_PUBLIC_USE_CGI=false
|
NEXT_PUBLIC_USE_CGI=false
|
||||||
# App-Versionsnummer
|
# App-Versionsnummer
|
||||||
NEXT_PUBLIC_APP_VERSION=1.6.608
|
NEXT_PUBLIC_APP_VERSION=1.6.610
|
||||||
NEXT_PUBLIC_CPL_MODE=json # json (Entwicklungsumgebung) oder jsSimulatedProd (CPL ->CGI-Interface-Simulator) oder production (CPL-> CGI-Interface Platzhalter)
|
NEXT_PUBLIC_CPL_MODE=json # json (Entwicklungsumgebung) oder jsSimulatedProd (CPL ->CGI-Interface-Simulator) oder production (CPL-> CGI-Interface Platzhalter)
|
||||||
|
|
||||||
|
|||||||
@@ -5,5 +5,5 @@ NEXT_PUBLIC_CPL_API_PATH=/CPL
|
|||||||
NEXT_PUBLIC_EXPORT_STATIC=true
|
NEXT_PUBLIC_EXPORT_STATIC=true
|
||||||
NEXT_PUBLIC_USE_CGI=true
|
NEXT_PUBLIC_USE_CGI=true
|
||||||
# App-Versionsnummer
|
# App-Versionsnummer
|
||||||
NEXT_PUBLIC_APP_VERSION=1.6.608
|
NEXT_PUBLIC_APP_VERSION=1.6.610
|
||||||
NEXT_PUBLIC_CPL_MODE=production
|
NEXT_PUBLIC_CPL_MODE=production
|
||||||
18
CHANGELOG.md
18
CHANGELOG.md
@@ -1,3 +1,21 @@
|
|||||||
|
## [1.6.610] – 2025-07-21
|
||||||
|
|
||||||
|
- feat(analogInputsChart): zeige Minimum (i) und Maximum (a) als zusätzliche Linien im Chart
|
||||||
|
|
||||||
|
- Chart zeigt jetzt Messwert (m), Minimum (i, grün) und Maximum (a, rot) für ausgewählten Zeitraum
|
||||||
|
- Tooltip und Legende angepasst
|
||||||
|
- Typdefinitionen für Chart
|
||||||
|
|
||||||
|
---
|
||||||
|
## [1.6.609] – 2025-07-21
|
||||||
|
|
||||||
|
- feat(analogInputsChart): zeige Minimum (i) und Maximum (a) als zusätzliche Linien im Chart
|
||||||
|
|
||||||
|
- Chart zeigt jetzt Messwert (m), Minimum (i, grün) und Maximum (a, rot) für ausgewählten Zeitraum
|
||||||
|
- Tooltip und Legende angepasst
|
||||||
|
- Typdefinitionen für Chart
|
||||||
|
|
||||||
|
---
|
||||||
## [1.6.608] – 2025-07-21
|
## [1.6.608] – 2025-07-21
|
||||||
|
|
||||||
- feat(analogInputsChart): zeige Minimum (i) und Maximum (a) als zusätzliche Linien im Chart
|
- feat(analogInputsChart): zeige Minimum (i) und Maximum (a) als zusätzliche Linien im Chart
|
||||||
|
|||||||
@@ -42,9 +42,10 @@ ChartJS.register(
|
|||||||
|
|
||||||
type AnalogInputHistoryPoint = {
|
type AnalogInputHistoryPoint = {
|
||||||
t: string;
|
t: string;
|
||||||
m: number;
|
m?: number;
|
||||||
i?: number;
|
i?: number;
|
||||||
a?: number;
|
a?: number;
|
||||||
|
g?: number;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default function AnalogInputsChart() {
|
export default function AnalogInputsChart() {
|
||||||
@@ -177,47 +178,85 @@ export default function AnalogInputsChart() {
|
|||||||
const chartData = {
|
const chartData = {
|
||||||
datasets:
|
datasets:
|
||||||
filteredPoints.length > 0
|
filteredPoints.length > 0
|
||||||
? [
|
? zeitraum === "DIA0"
|
||||||
{
|
? [
|
||||||
label: selectedAnalogInput?.label
|
{
|
||||||
? `Messwert (m) ${selectedAnalogInput.label}`
|
label: selectedAnalogInput?.label
|
||||||
: "Messwert (m)",
|
? `Messwert (m) ${selectedAnalogInput.label}`
|
||||||
data: filteredData.map((point) => ({
|
: "Messwert (m)",
|
||||||
x: new Date(point.t),
|
data: filteredData
|
||||||
y: point.m,
|
.filter((point) => typeof point.m === "number")
|
||||||
})),
|
.map((point) => ({ x: new Date(point.t), y: point.m })),
|
||||||
fill: false,
|
fill: false,
|
||||||
borderColor: getColor("littwin-blue"),
|
borderColor: getColor("littwin-blue"),
|
||||||
backgroundColor: "rgba(59,130,246,0.3)",
|
backgroundColor: "rgba(59,130,246,0.3)",
|
||||||
borderWidth: 2,
|
borderWidth: 2,
|
||||||
pointRadius: 0,
|
pointRadius: 0,
|
||||||
tension: 0.1,
|
tension: 0.1,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "Minimum (i)",
|
label: "Minimum (i)",
|
||||||
data: filteredData
|
data: filteredData
|
||||||
.filter((point) => typeof point.i === "number")
|
.filter((point) => typeof point.i === "number")
|
||||||
.map((point) => ({ x: new Date(point.t), y: point.i })),
|
.map((point) => ({ x: new Date(point.t), y: point.i })),
|
||||||
fill: false,
|
fill: false,
|
||||||
borderColor: "#22c55e", // grün
|
borderColor: "#22c55e", // grün
|
||||||
borderWidth: 1,
|
borderWidth: 1,
|
||||||
pointRadius: 0,
|
pointRadius: 0,
|
||||||
borderDash: [4, 2],
|
borderDash: [4, 2],
|
||||||
tension: 0.1,
|
tension: 0.1,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "Maximum (a)",
|
label: "Maximum (a)",
|
||||||
data: filteredData
|
data: filteredData
|
||||||
.filter((point) => typeof point.a === "number")
|
.filter((point) => typeof point.a === "number")
|
||||||
.map((point) => ({ x: new Date(point.t), y: point.a })),
|
.map((point) => ({ x: new Date(point.t), y: point.a })),
|
||||||
fill: false,
|
fill: false,
|
||||||
borderColor: "#ef4444", // rot
|
borderColor: "#ef4444", // rot
|
||||||
borderWidth: 1,
|
borderWidth: 1,
|
||||||
pointRadius: 0,
|
pointRadius: 0,
|
||||||
borderDash: [4, 2],
|
borderDash: [4, 2],
|
||||||
tension: 0.1,
|
tension: 0.1,
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
: [
|
||||||
|
{
|
||||||
|
label: "Minimum (i)",
|
||||||
|
data: filteredData
|
||||||
|
.filter((point) => typeof point.i === "number")
|
||||||
|
.map((point) => ({ x: new Date(point.t), y: point.i })),
|
||||||
|
fill: false,
|
||||||
|
borderColor: "#22c55e", // grün
|
||||||
|
borderWidth: 1,
|
||||||
|
pointRadius: 0,
|
||||||
|
borderDash: [4, 2],
|
||||||
|
tension: 0.1,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "Maximum (a)",
|
||||||
|
data: filteredData
|
||||||
|
.filter((point) => typeof point.a === "number")
|
||||||
|
.map((point) => ({ x: new Date(point.t), y: point.a })),
|
||||||
|
fill: false,
|
||||||
|
borderColor: "#ef4444", // rot
|
||||||
|
borderWidth: 1,
|
||||||
|
pointRadius: 0,
|
||||||
|
borderDash: [4, 2],
|
||||||
|
tension: 0.1,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "Durchschnitt (g)",
|
||||||
|
data: filteredData
|
||||||
|
.filter((point) => typeof point.g === "number")
|
||||||
|
.map((point) => ({ x: new Date(point.t), y: point.g })),
|
||||||
|
fill: false,
|
||||||
|
borderColor: "#6366f1", // indigo
|
||||||
|
borderWidth: 1,
|
||||||
|
pointRadius: 0,
|
||||||
|
borderDash: [2, 2],
|
||||||
|
tension: 0.1,
|
||||||
|
},
|
||||||
|
]
|
||||||
: [],
|
: [],
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "cpl-v4",
|
"name": "cpl-v4",
|
||||||
"version": "1.6.608",
|
"version": "1.6.610",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "cpl-v4",
|
"name": "cpl-v4",
|
||||||
"version": "1.6.608",
|
"version": "1.6.610",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@fontsource/roboto": "^5.1.0",
|
"@fontsource/roboto": "^5.1.0",
|
||||||
"@headlessui/react": "^2.2.4",
|
"@headlessui/react": "^2.2.4",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "cpl-v4",
|
"name": "cpl-v4",
|
||||||
"version": "1.6.608",
|
"version": "1.6.610",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "next dev",
|
"dev": "next dev",
|
||||||
|
|||||||
Reference in New Issue
Block a user