Skip to content

Commit f3192d7

Browse files
authored
[fix] Fixed empty chart showing annotation from other charts
1 parent 0ca2bd1 commit f3192d7

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

openwisp_utils/admin_theme/static/admin/js/ow-dashboard.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@
3030

3131
for (let i = 0; i < elementsParam.length; ++i) {
3232
layout.title.text = elementsParam[i].name;
33+
// Remove annotations added from previous chart.
34+
// Otherwise, empty chart will show annotations from
35+
// the previous chart.
36+
delete layout.annotations;
3337
let data = {
3438
type: 'pie',
3539
hole: 0.6,

0 commit comments

Comments
 (0)