Skip to content

sunburst plot isn't rendered without specifying a (single) root for branchvalues = 'total' #1664

Closed
@ismirsehregal

Description

@ismirsehregal

The following won't render:

library(plotly)

plot_ly(
  labels = c("Seth", "Enos", "Noam", "Awan", "Enoch"),
  parents = c("", "Seth", "Seth", "", "Awan"),
  values = c(12, 10, 2, 4, 4),
  type = "sunburst",
  branchvalues = "total"
)

Once we add a "root" the plot renders fine:

library(plotly)

plot_ly(
  labels = c("Eve", "Seth", "Enos", "Noam", "Awan", "Enoch"),
  parents = c("", "Eve", "Seth", "Seth", "Eve", "Awan"),
  values = c(16, 12, 10, 2, 4, 4),
  type = "sunburst",
  branchvalues = "total"
)

image

I guess, but I'm not sure if this pull request already adresses the problem.

I saw the problem here first.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions