refactoring

This commit is contained in:
frankknoll
2023-11-09 09:42:50 +01:00
parent 46e3f4c22d
commit f1262e8ab6

View File

@@ -12,13 +12,10 @@ class SymptomVsSymptomChartView {
if (this.#chart != null) {
this.#chart.destroy();
}
// FK-TODO: fetch multiple files: https://stackoverflow.com/a/31711496 or https://stackoverflow.com/a/53892713
PrrByVaccineProvider.getPrrByVaccine(symptomX)
.then(
prrByLotX => {
PrrByVaccineProvider.getPrrByVaccine(symptomY)
.then(
prrByLotY => {
// FK-TODO: move PrrByVaccineProvider.getPrrByVaccine() calls out of this function
Promise
.all([symptomX, symptomY].map(symptom => PrrByVaccineProvider.getPrrByVaccine(symptom)))
.then(([prrByLotX, prrByLotY]) => {
const chartData = SymptomVsSymptomChartDataProvider.getChartData({ prrByLotX, prrByLotY });
const data = {
datasets: [{
@@ -61,7 +58,6 @@ class SymptomVsSymptomChartView {
// }
config);
});
});
}
setData(histoDescr) {