Skip to content
Discussion options

You must be logged in to vote

Because HTML doesn't like numbers as element IDs, NiceGUI adds a "c" (for "component") in front of it. The utility functions getElement and getHtmlElement can be used to access such elements by their integer ID. But the latter, getHtmlElement, has just been added in NiceGUI 2.9.0, so you're probably using an older version.
Alternatively you can use getElement(...).$el:

splitter.on_value_change(lambda: ui.run_javascript(f'Plotly.Plots.resize(getElement({plot.id}).$el)'))

Replies: 1 comment 7 replies

Comment options

You must be logged in to vote
7 replies
@chupins
Comment options

@chupins
Comment options

@chupins
Comment options

@falkoschindler
Comment options

Answer selected by chupins
@chupins
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants