Skip to content

Commit

Permalink
improve update of ui.plotly
Browse files Browse the repository at this point in the history
  • Loading branch information
falkoschindler committed Feb 7, 2025
1 parent 5b42401 commit ac6a060
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
1 change: 1 addition & 0 deletions nicegui/elements/plotly.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ def update_figure(self, figure: Union[Dict, go.Figure]):
def update(self) -> None:
self._props['options'] = self._get_figure_json()
super().update()
self.run_method('update')

def _get_figure_json(self) -> Dict:
if isinstance(self.figure, go.Figure):
Expand Down
3 changes: 0 additions & 3 deletions nicegui/elements/plotly.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ export default {
await import("plotly");
this.update();
},
updated() {
this.update();
},
methods: {
update() {
// wait for plotly to be loaded
Expand Down

0 comments on commit ac6a060

Please sign in to comment.