What happened?
The Waterfall Chart operator marks the last row of the input as the chart's total bar
(measure=["relative"] * (len(y_values) - 1) + ["total"]). Plotly draws a total bar at
the accumulated sum of the preceding bars and ignores the value supplied for it, so the
last row's value is silently excluded from the chart while its data label still shows
that value.
Minimal case, four rows with values 1, 2, 3, 4. The final bar is drawn at 6, which is
1+2+3, and is labelled +4. The correct total for the four rows is 10, and the value 4
appears in no bar.
On a fifteen-row table whose values sum to 45.7 with a last row of 3.3, the final bar is
drawn at 42.4 and labelled +3.3:
Nothing in the operator asks for a summary row. The two fields are described as
"categories or stages" and "numeric values for each stage", and there is no option
controlling whether a total is drawn, so a plain detail table produces a bar whose height
and label disagree.
A second consequence appears when the X column is numeric and not already sorted. Plotly
orders a numeric axis by value while measure is positional, so the total bar is drawn
wherever that row's X value falls, which can be the middle of the chart with ordinary
increasing bars to the right of it.
The same code is generated by both generatePythonCode and generateStandaloneCode, so
the two agree with each other and the parity tests pass.
How to reproduce?
- Build a workflow of CSV File Scan into Waterfall Chart.
- Use a four-row table with a numeric column holding 1, 2, 3, 4 and any column for the
X axis.
- Set X Axis Values to the label column and Y Axis Values to the numeric column, then
run.
- The last bar is drawn at 6 and labelled
+4.
Version/Branch
1.3.0-incubating-SNAPSHOT (main)
Commit Hash (Optional)
2c2c0e5
What browsers are you seeing the problem on?
Chrome
Relevant log output
What happened?
The Waterfall Chart operator marks the last row of the input as the chart's total bar
(
measure=["relative"] * (len(y_values) - 1) + ["total"]). Plotly draws a total bar atthe accumulated sum of the preceding bars and ignores the value supplied for it, so the
last row's value is silently excluded from the chart while its data label still shows
that value.
Minimal case, four rows with values 1, 2, 3, 4. The final bar is drawn at 6, which is
1+2+3, and is labelled
+4. The correct total for the four rows is 10, and the value 4appears in no bar.
On a fifteen-row table whose values sum to 45.7 with a last row of 3.3, the final bar is
drawn at 42.4 and labelled
+3.3:Nothing in the operator asks for a summary row. The two fields are described as
"categories or stages" and "numeric values for each stage", and there is no option
controlling whether a total is drawn, so a plain detail table produces a bar whose height
and label disagree.
A second consequence appears when the X column is numeric and not already sorted. Plotly
orders a numeric axis by value while
measureis positional, so the total bar is drawnwherever that row's X value falls, which can be the middle of the chart with ordinary
increasing bars to the right of it.
The same code is generated by both
generatePythonCodeandgenerateStandaloneCode, sothe two agree with each other and the parity tests pass.
How to reproduce?
X axis.
run.
+4.Version/Branch
1.3.0-incubating-SNAPSHOT (main)
Commit Hash (Optional)
2c2c0e5
What browsers are you seeing the problem on?
Chrome
Relevant log output