diff --git a/docs/HistogramView.js b/docs/HistogramView.js index efe47133898..4d33bdd5706 100644 --- a/docs/HistogramView.js +++ b/docs/HistogramView.js @@ -9,13 +9,7 @@ class HistogramView { displayHistogramsForBatchcode(batchcode) { this .#loadHistoDescrsForBatchcode(batchcode) - .then(histoDescrs => { - for (const histoDescr of histoDescrs.histograms) { - const canvas = document.createElement("canvas"); - this.#uiContainer.appendChild(canvas); - this.#displayHistogram(histoDescr, canvas); - } - }); + .then(histoDescrs => this.#displayHistograms(histoDescrs)); } #loadHistoDescrsForBatchcode(batchcode) { @@ -28,6 +22,14 @@ class HistogramView { }) } + #displayHistograms(histoDescrs) { + for (const histoDescr of histoDescrs.histograms) { + const canvas = document.createElement("canvas"); + this.#uiContainer.appendChild(canvas); + this.#displayHistogram(histoDescr, canvas); + } + } + #displayHistogram(histoDescr, canvas) { // FK-TODO: brauchen Slider wie bei intensivstationen new Chart(