feat: implement Date in anlog inputs chart
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.497
|
NEXT_PUBLIC_APP_VERSION=1.6.499
|
||||||
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.497
|
NEXT_PUBLIC_APP_VERSION=1.6.499
|
||||||
NEXT_PUBLIC_CPL_MODE=production
|
NEXT_PUBLIC_CPL_MODE=production
|
||||||
10
CHANGELOG.md
10
CHANGELOG.md
@@ -1,3 +1,13 @@
|
|||||||
|
## [1.6.499] – 2025-06-27
|
||||||
|
|
||||||
|
- cleanup: delete old analog inputs mock data
|
||||||
|
|
||||||
|
---
|
||||||
|
## [1.6.498] – 2025-06-27
|
||||||
|
|
||||||
|
- cleanup: delete old analog inputs mock data
|
||||||
|
|
||||||
|
---
|
||||||
## [1.6.497] – 2025-06-27
|
## [1.6.497] – 2025-06-27
|
||||||
|
|
||||||
- fix: show history digital input
|
- fix: show history digital input
|
||||||
|
|||||||
@@ -113,7 +113,23 @@ export default function AnalogInputsChart({
|
|||||||
responsive: true,
|
responsive: true,
|
||||||
plugins: {
|
plugins: {
|
||||||
legend: { position: "top" as const },
|
legend: { position: "top" as const },
|
||||||
tooltip: { mode: "index" as const, intersect: false },
|
tooltip: {
|
||||||
|
mode: "index" as const,
|
||||||
|
intersect: false,
|
||||||
|
callbacks: {
|
||||||
|
label: function (context: import("chart.js").TooltipItem<"line">) {
|
||||||
|
const y = context.parsed.y;
|
||||||
|
return `Messwert: ${y}`;
|
||||||
|
},
|
||||||
|
title: function (
|
||||||
|
tooltipItems: import("chart.js").TooltipItem<"line">[]
|
||||||
|
) {
|
||||||
|
const date = tooltipItems[0].parsed.x;
|
||||||
|
return `Zeitpunkt: ${new Date(date).toLocaleString("de-DE")}`;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
title: {
|
title: {
|
||||||
display: true,
|
display: true,
|
||||||
text: `Verlauf der letzten 24 Stunden`,
|
text: `Verlauf der letzten 24 Stunden`,
|
||||||
@@ -134,13 +150,13 @@ export default function AnalogInputsChart({
|
|||||||
x: {
|
x: {
|
||||||
type: "time" as const,
|
type: "time" as const,
|
||||||
time: {
|
time: {
|
||||||
unit: "hour" as const,
|
unit: "day", // nur Datum in Achse
|
||||||
tooltipFormat: "HH:mm 'Uhr' dd.MM.",
|
tooltipFormat: "dd.MM.yyyy HH:mm", // aber Uhrzeit im Tooltip sichtbar
|
||||||
displayFormats: {
|
displayFormats: {
|
||||||
hour: "HH:mm",
|
day: "dd.MM.yyyy",
|
||||||
day: "dd.MM.",
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
adapters: {
|
adapters: {
|
||||||
date: {
|
date: {
|
||||||
locale: de,
|
locale: de,
|
||||||
|
|||||||
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "cpl-v4",
|
"name": "cpl-v4",
|
||||||
"version": "1.6.497",
|
"version": "1.6.499",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "cpl-v4",
|
"name": "cpl-v4",
|
||||||
"version": "1.6.497",
|
"version": "1.6.499",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@fontsource/roboto": "^5.1.0",
|
"@fontsource/roboto": "^5.1.0",
|
||||||
"@iconify-icons/ri": "^1.2.10",
|
"@iconify-icons/ri": "^1.2.10",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "cpl-v4",
|
"name": "cpl-v4",
|
||||||
"version": "1.6.497",
|
"version": "1.6.499",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "next dev",
|
"dev": "next dev",
|
||||||
|
|||||||
Reference in New Issue
Block a user