generate_cartesian_chart
Create Cartesian charts for various data visualization needs, including line, area, bar, waterfall, ranking bar, and funnel charts. Define chart type, dimensions, measures, and styling to visualize trends, comparisons, and processes effectively.
Instructions
Generates Cartesian charts: line (trends over time), area (cumulative totals), bar (category comparison), waterfall (incremental changes), ranking bar (ordered categories), and funnel (visualizes stages in a process or conversion rates).
Input Schema
Name | Required | Description | Default |
---|---|---|---|
background | No | Chart background color (hex). Optional, defaults to white. | |
chartTheme | No | Chart theme. Optional, defaults to 'light'. | |
chartType | Yes | ||
colorField | No | Color grouping field. Should not duplicate the dimension field. | |
colors | No | Color palette for chart elements. | |
dataTable | Yes | Data array, e.g., [{ x: '2018', y: 99.9 }]. Cannot be empty. | |
height | No | Chart height. Optional, defaults to 500. | |
output | No | Chart output type. Defaults to 'image'. | image |
stackOrPercent | No | Stacking mode: 'stack' for stacked data, 'percent' for percentage stacking. Requires 'color' field. | |
subTitle | No | Chart subtitle text. | |
timeField | No | Time field, such as year or month. The x field and time field must be different. this field is required in ranking_bar | |
title | No | Chart title text. | |
titleOrient | No | Title position in the chart. | |
transpose | No | Set to true only when displaying a horizontal bar chart. | |
width | No | Chart width. Optional, defaults to 500. | |
xAxisHasGrid | No | Show vertical grid lines for the X-axis. | |
xAxisHasLabel | No | Show X-axis labels. | |
xAxisHasTick | No | Show X-axis ticks. | |
xAxisOrient | No | X-axis position in the chart. | |
xAxisTitle | No | X-axis title. | |
xAxisType | No | X-axis type: categorical ('band') or continuous ('linear'). | |
xField | Yes | Dimension field. Must exist in the data. | |
yAxisHasGrid | No | Show horizontal grid lines for the Y-axis. | |
yAxisHasLabel | No | Show Y-axis labels. | |
yAxisHasTick | No | Show Y-axis ticks. | |
yAxisOrient | No | Y-axis position in the chart. | |
yAxisTitle | No | Y-axis title. | |
yAxisType | No | Y-axis type: categorical ('band') or continuous ('linear'). | |
yField | Yes | Measure field. Must be numeric and exist in the data. |