adding labels to AdverseReactionReportsChartView

This commit is contained in:
frankknoll
2023-04-17 14:32:47 +02:00
parent 47898b92ac
commit bd1996a339
4 changed files with 21 additions and 11 deletions

View File

@@ -14,8 +14,8 @@ class AdverseReactionReportsChartView {
this.#chart = new Chart(
this.#canvas,
{
// FK-TODO: use a Polar Area Chart ('polarArea') or bar chart
type: 'bar',
plugins: [ChartDataLabels],
data: this.#getData(ADRDescr),
options: this.#getOptions()
});
@@ -51,6 +51,12 @@ class AdverseReactionReportsChartView {
#getOptions() {
return {
plugins: {
datalabels: {
anchor: 'end',
align: 'top'
}
},
title: {
display: true,
position: 'top'