TDR Tooltip oberhalb des Punkts positionieren

This commit is contained in:
ISA
2025-03-26 08:00:02 +01:00
parent d98af6483e
commit 0bbc2a25a6
5 changed files with 15 additions and 4 deletions

View File

@@ -133,8 +133,9 @@ const TDRChart: React.FC<{ isFullScreen: boolean }> = ({ isFullScreen }) => {
}, },
plugins: { plugins: {
tooltip: { tooltip: {
yAlign: "bottom", // Tooltip oberhalb des Punktes
callbacks: { callbacks: {
title: () => "", // 🚫 Entfernt die erste Zeile mit der Nummer title: () => "Fehlerstelle", // Kein Titel
label: function (context) { label: function (context) {
const rawData = context.raw as { d: number; p: number }; const rawData = context.raw as { d: number; p: number };

View File

@@ -20,7 +20,7 @@ const TDRChartActionBar: React.FC = () => {
selectedSlot !== null ? tdmChartData[selectedSlot] ?? [] : []; selectedSlot !== null ? tdmChartData[selectedSlot] ?? [] : [];
const [selectedId, setSelectedId] = useState<number | null>(null); const [selectedId, setSelectedId] = useState<number | null>(null);
//-------------------------------
const handleSelectChange = async ( const handleSelectChange = async (
e: React.ChangeEvent<HTMLSelectElement> e: React.ChangeEvent<HTMLSelectElement>
) => { ) => {
@@ -33,7 +33,7 @@ const TDRChartActionBar: React.FC = () => {
dispatch(setTDRChartDataById({ id, data })); dispatch(setTDRChartDataById({ id, data }));
dispatch(setSelectedTDRId(id)); dispatch(setSelectedTDRId(id));
}; };
//-------------------------------
const handleReset = () => { const handleReset = () => {
setSelectedId(null); setSelectedId(null);
dispatch(setSelectedTDRId(-1)); // z.B. -1 als „Reset“-Kennzeichnung dispatch(setSelectedTDRId(-1)); // z.B. -1 als „Reset“-Kennzeichnung

View File

@@ -6,5 +6,5 @@
2: Patch oder Hotfix (Bugfixes oder kleine Änderungen). 2: Patch oder Hotfix (Bugfixes oder kleine Änderungen).
*/ */
const webVersion = "1.6.163"; const webVersion = "1.6.164";
export default webVersion; export default webVersion;

9
package-lock.json generated
View File

@@ -20,6 +20,7 @@
"chartjs-adapter-date-fns": "^3.0.0", "chartjs-adapter-date-fns": "^3.0.0",
"chartjs-adapter-moment": "^1.0.1", "chartjs-adapter-moment": "^1.0.1",
"chartjs-chart-financial": "^0.2.1", "chartjs-chart-financial": "^0.2.1",
"chartjs-plugin-annotation": "^3.1.0",
"chartjs-plugin-zoom": "^2.2.0", "chartjs-plugin-zoom": "^2.2.0",
"crypto-js": "^4.2.0", "crypto-js": "^4.2.0",
"date-fns": "^4.1.0", "date-fns": "^4.1.0",
@@ -2745,6 +2746,14 @@
"chart.js": "^4.0.0" "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": { "node_modules/chartjs-plugin-zoom": {
"version": "2.2.0", "version": "2.2.0",
"resolved": "https://registry.npmjs.org/chartjs-plugin-zoom/-/chartjs-plugin-zoom-2.2.0.tgz", "resolved": "https://registry.npmjs.org/chartjs-plugin-zoom/-/chartjs-plugin-zoom-2.2.0.tgz",

View File

@@ -25,6 +25,7 @@
"chartjs-adapter-date-fns": "^3.0.0", "chartjs-adapter-date-fns": "^3.0.0",
"chartjs-adapter-moment": "^1.0.1", "chartjs-adapter-moment": "^1.0.1",
"chartjs-chart-financial": "^0.2.1", "chartjs-chart-financial": "^0.2.1",
"chartjs-plugin-annotation": "^3.1.0",
"chartjs-plugin-zoom": "^2.2.0", "chartjs-plugin-zoom": "^2.2.0",
"crypto-js": "^4.2.0", "crypto-js": "^4.2.0",
"date-fns": "^4.1.0", "date-fns": "^4.1.0",