From cee46f56ec05455c4df13c456ae49613e68b8993 Mon Sep 17 00:00:00 2001 From: frankknoll Date: Thu, 9 Nov 2023 10:27:46 +0100 Subject: [PATCH] refactoring --- .../js/SymptomVsSymptomChartView.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/docs/SymptomsCausedByCOVIDLots/js/SymptomVsSymptomChartView.js b/docs/SymptomsCausedByCOVIDLots/js/SymptomVsSymptomChartView.js index 8a01b11386d..43b313cb3fd 100644 --- a/docs/SymptomsCausedByCOVIDLots/js/SymptomVsSymptomChartView.js +++ b/docs/SymptomsCausedByCOVIDLots/js/SymptomVsSymptomChartView.js @@ -11,10 +11,16 @@ class SymptomVsSymptomChartView { loadAndDisplayChart(symptomX, symptomY) { Promise .all([symptomX, symptomY].map(symptom => PrrByVaccineProvider.getPrrByVaccine(symptom))) - .then(([prrByLotX, prrByLotY]) => this.#displayChart(prrByLotX, prrByLotY, symptomX, symptomY)); + .then( + ([prrByLotX, prrByLotY]) => + this.#displayChart( + { symptom: symptomX, prrByLot: prrByLotX }, + { symptom: symptomY, prrByLot: prrByLotY })); } - #displayChart(prrByLotX, prrByLotY, symptomX, symptomY) { + #displayChart( + { symptom: symptomX, prrByLot: prrByLotX }, + { symptom: symptomY, prrByLot: prrByLotY }) { if (this.#chart != null) { this.#chart.destroy(); }