treemap.json•3.27 kB
{
"name": "generate_treemap_chart",
"description": "Generate a treemap chart to display hierarchical data and can intuitively show comparisons between items at the same level, such as, show disk space usage with treemap.",
"inputSchema": {
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"value": {
"type": "number"
},
"children": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"value": {
"type": "number"
},
"children": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"value": {
"type": "number"
}
},
"required": ["name", "value"]
}
}
},
"required": ["name", "value"]
}
}
},
"required": ["name", "value"]
},
"minItems": 1,
"description": "Data for treemap chart which is a hierarchical structure, such as, [{ name: 'Design', value: 70, children: [{ name: 'Tech', value: 20 }] }], and the maximum depth is 3."
},
"style": {
"type": "object",
"properties": {
"backgroundColor": {
"type": "string",
"description": "Background color of the chart, such as, '#fff'."
},
"palette": {
"type": "array",
"items": {
"type": "string"
},
"description": "Color palette for the chart, it is a collection of colors."
},
"texture": {
"type": "string",
"enum": ["default", "rough"],
"default": "default",
"description": "Set the texture for the chart, optional, default is 'default'. 'rough' refers to hand-drawn style."
}
},
"description": "Custom style configuration for the chart."
},
"theme": {
"type": "string",
"enum": ["default", "academy", "dark"],
"default": "default",
"description": "Set the theme for the chart, optional, default is 'default'."
},
"width": {
"type": "number",
"default": 600,
"description": "Set the width of chart, default is 600."
},
"height": {
"type": "number",
"default": 400,
"description": "Set the height of chart, default is 400."
},
"title": {
"type": "string",
"default": "",
"description": "Set the title of chart."
}
},
"required": ["data"],
"$schema": "http://json-schema.org/draft-07/schema#"
}
}