Skip to content

waterfall missing values are not respected #1517

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

Open
cpsievert opened this issue Apr 11, 2019 · 0 comments
Open

waterfall missing values are not respected #1517

cpsievert opened this issue Apr 11, 2019 · 0 comments

Comments

@cpsievert
Copy link
Collaborator

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"))
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