You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As was shown by @jonmmease mease in this comment: #3281 (comment) it is possible to update a full dataset in place within the alt.JupyterChart class. Currently this is possible using a primitive function jchart._py_to_js_updates().
What would an intuitive public facing method look like?
My current feeling is to do it similar to the jchart.params.
So if you do jchart.data you would get an overview of the available datasets within the specification.
The names of the datasets are also registered as attributes of jchart.data and using this method we also could assign the dataset as such:
(currently there is a dash instead of an underscore in the dataset name)
The current default behavior of altair is to try to collect all datasets globally within datasets, so a default scope of [] should be fine in almost all occasions I think.
Other ideas are welcome too!
Edit: or jchart.datasets instead of jchart.data
The text was updated successfully, but these errors were encountered:
I agree that having a public method for this would be convenient and I like your suggestion. I think it would be preferred over something like jchart.update_data('a0e7a86c692327a18bbeb2464725124c', df_update.to_dict("records") since users would likely already be using jchart.data to explore which ID to update. Are there any advantages that come to mind with having a function for updating the data instead of an assignment as in your suggestion? Maybe if one wants to do the update as part of list comprehension (although I think we can use the walrus operator for that nowadays)?
I would really love such a feature. We maintain a library for agent-based simulations, and often you collect some information each timestamp. Being able to plot a figure based on a database that can be updated in place, would be a really nice improvement for our user-facing visualization.
As was shown by @jonmmease mease in this comment: #3281 (comment) it is possible to update a full dataset in place within the
alt.JupyterChart
class. Currently this is possible using a primitive functionjchart._py_to_js_updates()
.What would an intuitive public facing method look like?
My current feeling is to do it similar to the
jchart.params
.So if you do
jchart.data
you would get an overview of the available datasets within the specification.The names of the datasets are also registered as attributes of
jchart.data
and using this method we also could assign the dataset as such:(currently there is a dash instead of an underscore in the dataset name)
The current default behavior of altair is to try to collect all datasets globally within
datasets
, so a defaultscope
of[]
should be fine in almost all occasions I think.Other ideas are welcome too!
Edit: or
jchart.datasets
instead ofjchart.data
The text was updated successfully, but these errors were encountered: