Skip to content

waterfall missing values are not respected #1517

Open
@cpsievert

Description

@cpsievert

I would expect this to render to https://rreusser.github.io/plotly-mock-viewer/#waterfall_profit-loss_2018_positive-negative, but it currently doesn't

y <- c("Sales", "Consulting", "Maintenance", "Other revenue", "Net revenue", "Purchases", "Material expenses", "Personnel expenses", "Other expenses", "Operating profit", "Investment income", "Financial income", "Profit before tax", "Income tax (15%)", "Profit after tax")
  
  d <- data.frame(
    measure = c("relative", "relative", "relative", "relative", "total", "relative", "relative", "relative", "relative", "total", "relative", "relative", "total", "relative", "total"),
    y = factor(y, levels = y),
    x = c(375, 128, 78, 27, NA, -327, -12, -78, -12, NA, 32, 89, NA, -45, NA)
  )
  
plot_ly(d, measure = ~measure, y = ~y, x = ~x) %>%
    add_trace(type = "waterfall", orientation = "h") %>%
    layout(yaxis = list(autorange = "reversed"))

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