From 0bbc2a25a6f807357272f0aec0e01f74deeeda73 Mon Sep 17 00:00:00 2001 From: ISA Date: Wed, 26 Mar 2025 08:00:02 +0100 Subject: [PATCH] TDR Tooltip oberhalb des Punkts positionieren --- .../kue705FO/Charts/TDRChart/TDRChart.tsx | 3 ++- .../kue705FO/Charts/TDRChart/TDRChartActionBar.tsx | 4 ++-- config/webVersion.ts | 2 +- package-lock.json | 9 +++++++++ package.json | 1 + 5 files changed, 15 insertions(+), 4 deletions(-) diff --git a/components/main/kabelueberwachung/kue705FO/Charts/TDRChart/TDRChart.tsx b/components/main/kabelueberwachung/kue705FO/Charts/TDRChart/TDRChart.tsx index c2c4575..31b7005 100644 --- a/components/main/kabelueberwachung/kue705FO/Charts/TDRChart/TDRChart.tsx +++ b/components/main/kabelueberwachung/kue705FO/Charts/TDRChart/TDRChart.tsx @@ -133,8 +133,9 @@ const TDRChart: React.FC<{ isFullScreen: boolean }> = ({ isFullScreen }) => { }, plugins: { tooltip: { + yAlign: "bottom", // Tooltip oberhalb des Punktes callbacks: { - title: () => "", // 🚫 Entfernt die erste Zeile mit der Nummer + title: () => "Fehlerstelle", // Kein Titel label: function (context) { const rawData = context.raw as { d: number; p: number }; diff --git a/components/main/kabelueberwachung/kue705FO/Charts/TDRChart/TDRChartActionBar.tsx b/components/main/kabelueberwachung/kue705FO/Charts/TDRChart/TDRChartActionBar.tsx index a18b4d9..a4da72c 100644 --- a/components/main/kabelueberwachung/kue705FO/Charts/TDRChart/TDRChartActionBar.tsx +++ b/components/main/kabelueberwachung/kue705FO/Charts/TDRChart/TDRChartActionBar.tsx @@ -20,7 +20,7 @@ const TDRChartActionBar: React.FC = () => { selectedSlot !== null ? tdmChartData[selectedSlot] ?? [] : []; const [selectedId, setSelectedId] = useState(null); - + //------------------------------- const handleSelectChange = async ( e: React.ChangeEvent ) => { @@ -33,7 +33,7 @@ const TDRChartActionBar: React.FC = () => { dispatch(setTDRChartDataById({ id, data })); dispatch(setSelectedTDRId(id)); }; - + //------------------------------- const handleReset = () => { setSelectedId(null); dispatch(setSelectedTDRId(-1)); // z. B. -1 als „Reset“-Kennzeichnung diff --git a/config/webVersion.ts b/config/webVersion.ts index e8e1676..e52b16b 100644 --- a/config/webVersion.ts +++ b/config/webVersion.ts @@ -6,5 +6,5 @@ 2: Patch oder Hotfix (Bugfixes oder kleine Änderungen). */ -const webVersion = "1.6.163"; +const webVersion = "1.6.164"; export default webVersion; diff --git a/package-lock.json b/package-lock.json index dffc28c..bfe915c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -20,6 +20,7 @@ "chartjs-adapter-date-fns": "^3.0.0", "chartjs-adapter-moment": "^1.0.1", "chartjs-chart-financial": "^0.2.1", + "chartjs-plugin-annotation": "^3.1.0", "chartjs-plugin-zoom": "^2.2.0", "crypto-js": "^4.2.0", "date-fns": "^4.1.0", @@ -2745,6 +2746,14 @@ "chart.js": "^4.0.0" } }, + "node_modules/chartjs-plugin-annotation": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/chartjs-plugin-annotation/-/chartjs-plugin-annotation-3.1.0.tgz", + "integrity": "sha512-EkAed6/ycXD/7n0ShrlT1T2Hm3acnbFhgkIEJLa0X+M6S16x0zwj1Fv4suv/2bwayCT3jGPdAtI9uLcAMToaQQ==", + "peerDependencies": { + "chart.js": ">=4.0.0" + } + }, "node_modules/chartjs-plugin-zoom": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/chartjs-plugin-zoom/-/chartjs-plugin-zoom-2.2.0.tgz", diff --git a/package.json b/package.json index 5a917af..ff41af0 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,7 @@ "chartjs-adapter-date-fns": "^3.0.0", "chartjs-adapter-moment": "^1.0.1", "chartjs-chart-financial": "^0.2.1", + "chartjs-plugin-annotation": "^3.1.0", "chartjs-plugin-zoom": "^2.2.0", "crypto-js": "^4.2.0", "date-fns": "^4.1.0",