New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Delete Data from Heat Figs with Patch() [Feature Request] #2802
Comments
Short-term I'd suggest trying to do this with a client-side callback. I recall us discussing this situation when we were designing the feature in the first place, and not coming up with a good syntax, since what you're suggesting doesn't have a simple Python analog - if you were modifying the real object rather than a for row in fig['data'][0]['z']:
del row[0] but we can't iterate over something we don't have, so the only route I could think of would be some new syntax like: del fig['data'][0]['z'][dash.FOREACH][0] |
Hey, I'm looking to make my first contribution to an open source project and am looking to make this feature my first contribution. I want to ensure that I'm following the correct procedures as I go through this process. Is there a general protocol to how one contributes to this project? Thank you. |
hi @justinzhu17 my email: adam@plot.ly |
hey @Coding-with-Adam |
Attempt to implement feature request plotly#2802
Implementation of Feature Request plotly#2802
I am trying to delete some data from a heat fig, and it doesn't seem to be possible with patch. With patch, you would return something like
to delete the first item in the heatfig. The issue is that the heatfig has the following structure:
and so you would need to loop through each list in the z field to remove the first item as well (as the heatfig is a 3D array). We can't know ahead of time how many items are in the z field making it impossible to delete data.
Basically, if you want to remove the first timestamp in the fig, you would need the data to look like:
I don't want to load in the whole fig as state because it is quite large (and defeats the purpose of using a Patch()).
I haven't found a work around for this yet.
The text was updated successfully, but these errors were encountered: