Skip to content

Commit ac6a060

Browse files
improve update of ui.plotly
1 parent 5b42401 commit ac6a060

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

nicegui/elements/plotly.py

+1
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ def update_figure(self, figure: Union[Dict, go.Figure]):
4646
def update(self) -> None:
4747
self._props['options'] = self._get_figure_json()
4848
super().update()
49+
self.run_method('update')
4950

5051
def _get_figure_json(self) -> Dict:
5152
if isinstance(self.figure, go.Figure):

nicegui/elements/plotly.vue

-3
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@ export default {
88
await import("plotly");
99
this.update();
1010
},
11-
updated() {
12-
this.update();
13-
},
1411
methods: {
1512
update() {
1613
// wait for plotly to be loaded

0 commit comments

Comments
 (0)