Skip to content

Commit 91ba8e5

Browse files
Explicitly type wordcloud data
1 parent 29f02e2 commit 91ba8e5

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

frontend/src/app/visualization/wordcloud/wordcloud.component.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,14 +97,16 @@ export class WordcloudComponent implements OnChanges, OnDestroy {
9797

9898
makeChart(result: MostFrequentWordsResult[]) {
9999
if (!this.asTable) {
100-
const data = this.chartData(result);
100+
const data: ChartData<'wordCloud'> = this.chartData(
101+
result,
102+
) as ChartData<'wordCloud'>;
101103
const options = this.chartOptions(result);
102104

103105
if (this.chart) {
104106
this.chart.data = data;
105107
this.chart.update();
106108
} else {
107-
this.chart = new WordCloudChart('wordCloud', { data, options });
109+
this.chart = new WordCloudChart('wordcloud', { data, options });
108110
}
109111
}
110112
}

0 commit comments

Comments
 (0)