Plot_ly sunburst restyle event puts sunburst in weird state
还没有人认领这个 Issue。
- 主要语言
- R
- 星标
- 2.7k
- 派生
- 641
- PR 合并指标
- 30 天内没有已合并 PR
描述
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.
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
从 issue 中的 plotlyProxyInvoke("restyle", ...) 调用开始,重现将三级 sunburst restyling 到 leaf id 后的导航。跟踪叶节点状态和点击处理;当点击叶视图可以导航回其父节点并正确重新渲染时,即完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- r
- 领域
- data-visualization
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 35/100