making scatter chart for symptoms downloadable

This commit is contained in:
frankknoll
2023-11-10 18:45:45 +01:00
parent acfe871d1d
commit 596eca2387
3 changed files with 53 additions and 8 deletions

View File

@@ -8,12 +8,13 @@ class SymptomVsSymptomChartView {
}
loadAndDisplayChart(symptomX, symptomY) {
Promise
return Promise
.all([symptomX, symptomY].map(symptom => PrrByVaccineProvider.getPrrByVaccine(symptom)))
.then(
([prrByLotX, prrByLotY]) => {
const { labels, data } = SymptomVsSymptomChartDataProvider.getChartData({ prrByLotX, prrByLotY });
this.#displayChart(symptomX, symptomY, labels, data);
return { labels, data };
});
}