feat: redraw chart on dom change events
This commit is contained in:
parent
95ec49322c
commit
4d46b44142
1 changed files with 15 additions and 0 deletions
|
|
@ -23,6 +23,7 @@ export default class ChartWidget extends Widget {
|
|||
delete this.dashboard_chart;
|
||||
this.set_body();
|
||||
this.make_chart();
|
||||
this.setup_events();
|
||||
}
|
||||
|
||||
set_chart_title() {
|
||||
|
|
@ -715,4 +716,18 @@ export default class ChartWidget extends Widget {
|
|||
}
|
||||
});
|
||||
}
|
||||
|
||||
setup_events() {
|
||||
$(document.body).on('toggleDeskSidebar', () => {
|
||||
this.dashboard_chart && this.dashboard_chart.draw(true);
|
||||
});
|
||||
|
||||
$(document.body).on('toggleListSidebar', () => {
|
||||
this.dashboard_chart && this.dashboard_chart.draw(true);
|
||||
});
|
||||
|
||||
$(document.body).on('toggleFullWidth', () => {
|
||||
this.dashboard_chart && this.dashboard_chart.draw(true);
|
||||
});
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue