generate_hierarchical_chart
Visualize hierarchical data proportions using sunburst, treemap, or circle packing charts. Specify dimensions, measures, and themes to create interactive or static outputs for multi-level categorical analysis.
Instructions
Generate a chart for hierarchical visualization of multi-level categorical data proportions, include sunburst, treemap, circle_packing.
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 | Chart type | |
colorField | Yes | ||
colors | No | Color palette for chart elements. | |
dataTable | Yes | Hierarchical data for the chart, e.g., [{ category: 'Category 0', subCategory: 'Category 01', value: 10}]. | |
height | No | Chart height. Optional, defaults to 500. | |
output | No | Chart output type. Defaults to 'image'. | image |
subTitle | No | Chart subtitle text. | |
title | No | Chart title text. | |
titleOrient | No | Title position in the chart. | |
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": {
"background": {
"description": "Chart background color (hex). Optional, defaults to white.",
"type": "string"
},
"chartTheme": {
"description": "Chart theme. Optional, defaults to 'light'.",
"enum": [
"light",
"dark"
],
"type": "string"
},
"chartType": {
"description": "Chart type",
"enum": [
"sunburst",
"treemap",
"circle_packing"
],
"type": "string"
},
"colorField": {
"items": {
"description": "Dimension field. Must exist in the data.",
"minLength": 1,
"type": "string"
},
"minItems": 1,
"type": "array"
},
"colors": {
"anyOf": [
{
"items": {
"description": "Color value",
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"description": "Color palette for chart elements."
},
"dataTable": {
"description": "Hierarchical data for the chart, e.g., [{ category: 'Category 0', subCategory: '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"
},
"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"
},
"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": [
"chartType",
"dataTable",
"colorField",
"valueField"
],
"type": "object"
}