Jun-11-2024, 03:41 PM
(This post was last modified: Jun-11-2024, 03:41 PM by deanhystad.)
The problem is here:
textposition = "outside" text = ["+60", "+80", "" "-40", "-20", "Total"] y = [60, 80, 0, -40, -20, 0]You need commas between arguments in a function call.
fig = go.Figure(go.Waterfall( measure = ["relative", "relative", "total", "relative", "relative, "total"] "Sales # What is this? x = ["Sales", "Consulting", "Net revenue", "Purchases", "Other Expenses", "Profit Before Tax"], textposition = "outside", text = ["+60", "+80", "" "-40", "-20", "Total"], y = [60, 80, 0, -40, -20, 0], connector = "line":{"color":"rgb(63, 63, 63)"},) # Comma here not needed.There is a problem with "Sales. What is it supposed to be? As a string you need an end quote, but fixing that, you still have an error. Is sales supposed to be part of measure? Is sales a different argument. If so , you need to provide an argument name (argument_name="Sales"),