diff --git a/packages/demo/public/options.json b/packages/demo/public/options.json index b376dfe..fd5d96c 100644 --- a/packages/demo/public/options.json +++ b/packages/demo/public/options.json @@ -45,17 +45,60 @@ ] }, "therapy_of_tumor": { - "aggregations": ["medicationStatements"] + "aggregations": ["medicationStatements"], + "tooltips": { + "OP": "Operationen", + "ST": "Strahlentherapien", + "medicationStatements": "Systemische Therapien" + } }, "medicationStatements": { "hintText": [ "Art der systemischen oder abwartenden Therapie (ADT Basisdatensatz Versionen 2014, 2021)" - ] + ], + "tooltips":{ + "CH": "Chemotherapie", + "HO": "Hormontherapie", + "IM": "Immun-/Antikörpertherapie", + "KM": "Knochenmarktransplantation", + "ZS": "zielgerichtete Substanzen", + "CI": "Chemo- + Immun-/Antikörpertherapie", + "CZ": "Chemotherapie + zielgerichtete Substanzen", + "CIZ": "Chemo- + Immun-/Antikörpertherapie + zielgerichtete Substanzen", + "IZ": "Immun-/Antikörpertherapie + zielgerichtete Substanzen", + "SZ": "Stammzelltransplantation (inklusive Knochenmarktransplantation)", + "AS": "Active Surveillance", + "WS": "Wait and see", + "WW": "Watchful Waiting", + "SO": "Sonstiges" + } }, "sample_kind": { "hintText": [ "Verteilung der Bioprobentypen der Patienten gemäß der ausgewählten Kriterien. Es werden auch Einträge angezeigt, die ggfs. außerhalb der Suchkriterien liegen." - ] + ], + "tooltips":{ + "whole-blood": "Vollblut", + "bone-marrow": "Knochenmark", + "buffy-coat": "Buffycoat", + "dried-whole-blood": "Blutkarten Guthrie", + "peripheral-blood-cells": "Periphere mononukleäre Blutzellen (PBMC,", + "blood-plasma": "Plasma", + "blood-serum": "Serum", + "ascites": "Aszites", + "csf-liquor": "Liquor", + "saliva": "Speichel", + "stool-faeces": "Stuhl", + "urine": "Urin", + "swab": "Abstrich", + "liquid-other": "Flüssigprobe, Andere", + "tissue-ffpe": "Gewebe FFPE", + "tissue-frozen": "Gewebe schockgefroren", + "tissue-other": "Gewebe, Andere Konservierungsart", + "dna": "DNA", + "rna": "RNA", + "derivative-other": "Derivat, Andere" + } } } } \ No newline at end of file diff --git a/packages/demo/src/AppCCP.svelte b/packages/demo/src/AppCCP.svelte index caaf342..c043a4b 100644 --- a/packages/demo/src/AppCCP.svelte +++ b/packages/demo/src/AppCCP.svelte @@ -150,47 +150,6 @@ "Sys. T" ); - const therapyTooltips: Map = new Map() - .set("OP", "Operationen") - .set("ST", "Strahlentherapien") - .set("medicationStatements", "Systemische Therapien"); - - const systemicTherapyTooltips: Map = new Map() - .set("CH", "Chemotherapie") - .set("HO", "Hormontherapie") - .set("IM", "Immun- und Antikörpertherapie") - .set("KM", "Knochenmarkstransplantation") - .set("WS", "Wait and see") - .set("AS", "Active Surveillance") - .set("ZS", "Zielgerichtete Substanzen") - .set("SO", "Sonstiges") - .set("ST", "Strahlentherapie") - .set("OP", "Operation"); - - const specimenHeaders: Map = new Map() - .set("whole-blood", "Whole blood") - .set("bone-marrow", "Bone marrow") - .set("buffy-coat", "Buffy-Coat") - .set("dried-whole-blood", "Dried whole blood") - .set( - "peripheral-blood-cells-vital", - "Peripheral blood mononuclear cells (PBMCs, viable)" - ) - .set("blood-plasma", "Plasma") - .set("blood-serum", "Serum") - .set("ascites", "Ascites") - .set("csf-liquor", "CSF/Liquor") - .set("saliva", "Saliva") - .set("stool-faeces", "Stool/Faeces") - .set("urine", "Urine") - .set("swab", "Swab") - .set("liquid-other", "Other liquid biosample/storage") - .set("tissue-ffpe", "Tissue FFPE") - .set("tissue-frozen", "Tissue frozen") - .set("tissue-other", "Other tissue storage") - .set("dna", "DNA") - .set("rna", "RNA") - .set("derivative-other", "Other derivative"); @@ -311,7 +270,6 @@ catalogueGroupCode="therapy_of_tumor" chartType="bar" headers={therapyHeaders} - tooltips={therapyTooltips} xAxisTitle="Art der Therapie" yAxisTitle="Anzahl der Therapien" /> @@ -321,7 +279,6 @@ title="Systemische Therapien" catalogueGroupCode="medicationStatements" chartType="bar" - tooltips={systemicTherapyTooltips} xAxisTitle="Art der Therapie" yAxisTitle="Anzahl der Therapien" /> @@ -333,7 +290,6 @@ chartType="bar" xAxisTitle="Probentypen" yAxisTitle="Probenanzahl" - tooltips={specimenHeaders} /> @@ -350,4 +306,4 @@ > - \ No newline at end of file + diff --git a/packages/lib/src/components/results/ChartComponent.wc.svelte b/packages/lib/src/components/results/ChartComponent.wc.svelte index 246e0ad..160aeff 100644 --- a/packages/lib/src/components/results/ChartComponent.wc.svelte +++ b/packages/lib/src/components/results/ChartComponent.wc.svelte @@ -114,9 +114,9 @@ callbacks: { title: (context: any) => { const key = context[0].label || ""; - let result = tooltips.get(key) - ? tooltips.get(key) - : key; + let result = options.tooltips && options.tooltips[key] + ? options.tooltips[key] + : key return result; }, },