refactoring
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user