generate_polar_chart
Create polar charts (rose, radar, pie) to visualize numerical differences across categories using polar coordinates, with customizable dimensions, themes, and axis settings.
Instructions
Generate a polar chart (rose, radar, pie) to display numerical differences among different categories using radius and angle in polar coordinates.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
angleAxisHasGrid | No | Show grid lines for the angle axis. | |
angleAxisHasLabel | No | Show angle axis labels. | |
angleAxisHasTick | No | Show angle axis ticks. | |
angleAxisTitle | No | Angle axis title. | |
angleAxisType | No | Angle axis type: categorical ('band') or continuous ('linear'). | |
background | No | Chart background color (hex). Optional, defaults to white. | |
categoryField | Yes | Dimension field. Must exist in the data. | |
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 for the chart, e.g., [{ category: 'Category 01', value: 10 }]. | |
height | No | Chart height. Optional, defaults to 500. | |
output | No | Chart output type. Defaults to 'image'. | image |
radiusAxisHasGrid | No | Show grid lines for the radius axis. | |
radiusAxisHasLabel | No | Show radius axis labels. | |
radiusAxisHasTick | No | Show radius axis ticks. | |
radiusAxisTitle | No | Radius axis title. | |
radiusAxisType | No | Radius axis type: categorical ('band') or continuous ('linear'). | |
stackOrPercent | No | Stacking mode: 'stack' for stacked data, 'percent' for percentage stacking. Requires 'color' field. | |
subTitle | No | Chart subtitle text. | |
title | No | Chart title text. | |
titleOrient | No | Title position in the chart. | |
transpose | No | ||
valueField | Yes | Measure field. Must be numeric and exist in the data. | |
width | No | Chart width. Optional, defaults to 500. |
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"angleAxisHasGrid": {
"description": "Show grid lines for the angle axis.",
"type": "boolean"
},
"angleAxisHasLabel": {
"description": "Show angle axis labels.",
"type": "boolean"
},
"angleAxisHasTick": {
"description": "Show angle axis ticks.",
"type": "boolean"
},
"angleAxisTitle": {
"description": "Angle axis title.",
"type": "string"
},
"angleAxisType": {
"description": "Angle axis type: categorical ('band') or continuous ('linear').",
"enum": [
"band",
"linear"
],
"type": "string"
},
"background": {
"description": "Chart background color (hex). Optional, defaults to white.",
"type": "string"
},
"categoryField": {
"description": "Dimension field. Must exist in the data.",
"minLength": 1,
"type": "string"
},
"chartTheme": {
"description": "Chart theme. Optional, defaults to 'light'.",
"enum": [
"light",
"dark"
],
"type": "string"
},
"chartType": {
"enum": [
"rose",
"radar",
"pie"
],
"type": "string"
},
"colorField": {
"description": "Color grouping field. Should not duplicate the dimension field.",
"type": "string"
},
"colors": {
"anyOf": [
{
"items": {
"description": "Color value",
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"description": "Color palette for chart elements."
},
"dataTable": {
"description": "Data for the chart, e.g., [{ category: 'Category 01', value: 10 }].",
"minItems": 1,
"type": "array"
},
"height": {
"description": "Chart height. Optional, defaults to 500.",
"type": "number"
},
"output": {
"default": "image",
"description": "Chart output type. Defaults to 'image'.",
"enum": [
"spec",
"image",
"html"
],
"type": "string"
},
"radiusAxisHasGrid": {
"description": "Show grid lines for the radius axis.",
"type": "boolean"
},
"radiusAxisHasLabel": {
"description": "Show radius axis labels.",
"type": "boolean"
},
"radiusAxisHasTick": {
"description": "Show radius axis ticks.",
"type": "boolean"
},
"radiusAxisTitle": {
"description": "Radius axis title.",
"type": "string"
},
"radiusAxisType": {
"description": "Radius axis type: categorical ('band') or continuous ('linear').",
"enum": [
"band",
"linear"
],
"type": "string"
},
"stackOrPercent": {
"description": "Stacking mode: 'stack' for stacked data, 'percent' for percentage stacking. Requires 'color' field.",
"enum": [
"stack",
"percent"
],
"type": "string"
},
"subTitle": {
"description": "Chart subtitle text.",
"type": "string"
},
"title": {
"description": "Chart title text.",
"type": "string"
},
"titleOrient": {
"description": "Title position in the chart.",
"enum": [
"top",
"left",
"right",
"bottom"
],
"type": "string"
},
"transpose": {
"type": "boolean"
},
"valueField": {
"description": "Measure field. Must be numeric and exist in the data.",
"minLength": 1,
"type": "string"
},
"width": {
"description": "Chart width. Optional, defaults to 500.",
"type": "number"
}
},
"required": [
"dataTable",
"chartType",
"categoryField",
"valueField"
],
"type": "object"
}