Skip to content

select2d and lasso2d not working in Rstudio's Plotly Sankey diagram #4272

@edriclee

Description

@edriclee

library(plotly)

p <- plot_ly(
type = "sankey",
orientation = "h",

node = list(
label = c("A1", "A2", "B1", "B2", "C1", "C2"),
color = c("blue", "blue", "blue", "blue", "blue", "blue"),
pad = 15,
thickness = 20,
line = list(
color = "black",
width = 0.5
)
),

link = list(
source = c(0,1,0,2,3,3),
target = c(2,3,3,4,4,5),
value = c(8,4,2,8,4,2)
)
) %>%
layout(
title = "Basic Sankey Diagram",
font = list(
size = 10
)
) %>%
config(modeBarButtons = list(list("select2d"), list("lasso2d")))
p

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