displaying histograms for each country and batchcode

This commit is contained in:
frankknoll
2023-02-12 18:34:13 +01:00
parent 21118a4f35
commit baaac31f1c
4 changed files with 205 additions and 86 deletions

View File

@@ -6,17 +6,17 @@ class HistogramView {
this.#uiContainer = uiContainer
}
displayHistogramViewForBatchcode(batchcode) {
displayHistogramView(country, batchcode) {
this
.#loadHistoDescrsForBatchcode(batchcode)
.#loadHistoDescrs(country, batchcode)
.then(histoDescrs => this.#displayHistogramViewForHistoDescrs(histoDescrs));
}
#loadHistoDescrsForBatchcode(batchcode) {
#loadHistoDescrs(country, batchcode) {
const loadingText = document.createTextNode('Loading...');
this.#uiContainer.appendChild(loadingText);
return HistoDescrsProvider
.getHistoDescrsForBatchcode(batchcode)
.getHistoDescrs(country, batchcode)
.then(histoDescrs => {
loadingText.remove();
return histoDescrs;