Skip to content
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

Plot_ly sunburst restyle event puts sunburst in weird state #2371

Open
kramerrs opened this issue Jul 25, 2024 · 0 comments
Open

Plot_ly sunburst restyle event puts sunburst in weird state #2371

kramerrs opened this issue Jul 25, 2024 · 0 comments

Comments

@kramerrs
Copy link

I have a large sunburst it is laid out with three levels. I have implemented click events to synchronize other tables and charts as a user navigates the sunburst.

I am trying to implement a search box that takes the user directly to a node in the sunburst. I am using plotlyProxy and send the restyle

gotothis<-sbd %>% filter(labels==input$sunburstquery) %>% pull(ids)
sunburstproxy %>% plotlyProxyInvoke("restyle", list(level=gotothis))

In this case gotothis would be the id of the table that the sunburst was created from. In most cases this works in the desired method. If I restyle to one of the levels in the middle it draws the sunburst as if I had just clicked on that node. However, when the level is a leaf. It draws a single circle with that leaf in it no parents.

Which is fine I suppose, however when I try to navigate to the parent by clicking the circle as if it were the center circle, then it doesn't rerender the parent, though the click event is registered. To reiterate this works as expected when I restyle the level to the parent level. There doesn't appear to be anyway to rescue the state of the plotly sunburst after it is restyled to a leaf node.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant