adding AdverseReactionReportsChartView
This commit is contained in:
@@ -30,6 +30,7 @@ class HistogramView {
|
||||
this.#displayData(histoDescrs);
|
||||
const chartWithSlider = UIUtils.instantiateTemplate('template-chartWithSlider');
|
||||
const histogramChartView = new HistogramChartView(chartWithSlider.querySelector("canvas"));
|
||||
this.#displayAdverseReactionReportsChart(histoDescrs);
|
||||
this.#displaySelectBatchcodeCombination(histoDescrs.histograms, histogramChartView, chartWithSlider);
|
||||
this.#uiContainer.appendChild(chartWithSlider);
|
||||
this.#displayHistogram(histoDescrs.histograms[0], histogramChartView, chartWithSlider);
|
||||
@@ -41,6 +42,19 @@ class HistogramView {
|
||||
this.#uiContainer.appendChild(h1);
|
||||
}
|
||||
|
||||
#displayAdverseReactionReportsChart(histoDescrs) {
|
||||
const canvas = UIUtils.instantiateTemplate('template-canvas');
|
||||
this.#uiContainer.appendChild(canvas);
|
||||
const adverseReactionReportsChartView = new AdverseReactionReportsChartView(canvas);
|
||||
adverseReactionReportsChartView.displayChart(
|
||||
{
|
||||
'Adverse Reaction Reports': histoDescrs['Adverse Reaction Reports'],
|
||||
'Deaths': histoDescrs['Deaths'],
|
||||
'Disabilities': histoDescrs['Disabilities'],
|
||||
'Life Threatening Illnesses': histoDescrs['Life Threatening Illnesses']
|
||||
});
|
||||
}
|
||||
|
||||
#displayData(histoDescrs) {
|
||||
const p = document.createElement("p");
|
||||
p.appendChild(document.createTextNode(`ADRs: ${histoDescrs['Adverse Reaction Reports']}`));
|
||||
|
||||
Reference in New Issue
Block a user