waterfall missing values are not respected
Open
Nobody has claimed this yet.
- Dominant language
- R
- Stars
- 2.7k
- Forks
- 641
- PR merge metrics
- No merged PRs in 30d
Description
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"))
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the horizontal waterfall example from the issue using plot_ly, add_trace(type = "waterfall", orientation = "h"), and layout. Compare it with the expected plotly-mock-viewer result, then trace how the R binding passes NA values and waterfall measures. Done means the supplied example renders the missing values as expected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r
- Domain
- data-visualization
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100