generate_waterfall_chart
Generate a waterfall chart to show how sequential positive or negative values change an initial amount into a final total, useful for budget tracking and profit-and-loss analysis.
Instructions
Generate a waterfall chart to visualize the cumulative effect of sequentially introduced positive or negative values, such as showing how an initial value is affected by a series of intermediate positive or negative values leading to a final result. Waterfall charts are ideal for financial analysis, budget tracking, profit and loss statements, and understanding the composition of changes over time or categories.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | Data for waterfall chart, it should be an array of objects. Each object must contain a `category` field. For regular items, a `value` field is also required. The `isIntermediateTotal` field marks intermediate subtotals, and the `isTotal` field marks the final total. For example, [{ category: 'Initial', value: 100 }, { category: 'Increase', value: 50 }, { category: 'Subtotal', isIntermediateTotal: true }, { category: 'Decrease', value: -30 }, { category: 'Total', isTotal: true }]. | |
| style | No | Style configuration for the chart with a JSON object, optional. | |
| theme | No | Set the theme for the chart, optional, default is 'default'. | default |
| title | No | Set the title of chart. | |
| width | No | Set the width of chart, default is 600. | |
| height | No | Set the height of chart, default is 400. | |
| axisXTitle | No | Set the x-axis title of chart. | |
| axisYTitle | No | Set the y-axis title of chart. |