Skip to content

Commit d0c66f7

Browse files
use update_method and introduce setter for options property
1 parent 7055c26 commit d0c66f7

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

nicegui_highcharts/highchart.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ def __init__(self, options: dict, *,
4343
self._props['type'] = type
4444
self._props['options'] = options
4545
self._props['extras'] = extras
46+
self._update_method = 'update_chart'
4647

4748
if on_point_click:
4849
def handle_point_click(e: events.GenericEventArguments) -> None:
@@ -97,6 +98,6 @@ def options(self) -> dict:
9798
"""The options dictionary."""
9899
return self._props['options']
99100

100-
def update(self) -> None:
101-
super().update()
102-
self.run_method('update_chart')
101+
@options.setter
102+
def options(self, value: dict) -> None:
103+
self._props['options'] = value

0 commit comments

Comments
 (0)