Elysia Tools Docs
ZH
语言
ZHESPTRUFRDEEN
返回主站
浏览工具

Data Visualization

冰柱图生成器

生成交互式冰柱图用于层级数据可视化,非常适合显示树形结构、文件系统和组织架构

html· HTML 结果打开工具

快速开始

用三种语言从你的代码中调用此工具。

cURL
curl -X POST 'https://api.elysiatools.com/zh/api/tools/icicle-chart-generator' \
  -H 'Content-Type: application/json' \
  -d '{"chartData":"JSON format:\n{\n  "name": "Root",\n  "value": 100,\n  "children": [\n    {\n      "name": "Branch A",\n      "value": 60,\n      "children": [\n        {"name": "Leaf A1", "value": 30},\n        {"name": "Leaf A2", "value": 30}\n      ]\n    }\n  ]\n}","chartTitle":"输入图表标题...","colorScheme":"ocean","customColors":"[\"#FF6B6B\", \"#4ECDC4\", \"#45B7D1\", \"#96CEB4\"]","valueFormat":"number","chartWidth":"600","chartHeight":"500","startLevel":"0","maxDepth":"3","labelSize":"12","paddingSize":"2","borderRadius":"4","strokeWidth":"1","backgroundColor":"#ffffff","strokeColor":"#ffffff","showLabels":true,"showValues":true,"showPercentages":false,"enableTooltip":true,"chartOrientation":"horizontal","hoverAnimation":true}'

© 2026 Elysia Tools. 开发者文档。

返回主站浏览工具

API 参考

以 JSON 形式 POST 提交输入参数。文件类型参数需先单独上传。

请求端点

HTTP
POST https://api.elysiatools.com/zh/api/tools/icicle-chart-generator

请求参数

参数名类型必填说明
chartDatatextarea是JSON格式的层级数据,包含名称、数值和可选的子数组
chartTitletext否显示在图表上方的标题
colorSchemeselect否—
customColorstextarea否十六进制颜色JSON数组(需要选择自定义颜色)
valueFormatselect否—
chartWidthnumber否图表的像素宽度(最小:400,最大:1200)
chartHeightnumber否图表的像素高度(最小:300,最大:800)
startLevelnumber否显示的起始层级(0 = 根层级)
maxDepthnumber否显示的最大层级数
labelSizenumber否标签的字体大小(最小:8,最大:16)
paddingSizenumber否矩形之间的间距(最小:0,最大:10)
borderRadiusnumber否矩形的圆角半径(最小:0,最大:8)
strokeWidthnumber否矩形的边框宽度(最小:0,最大:3)
backgroundColorcolor否图表容器的背景颜色
strokeColorcolor否矩形的边框颜色
showLabelscheckbox否在矩形内显示类别名称
showValuescheckbox否在矩形内显示数值
showPercentagescheckbox否显示百分比而不是绝对值
enableTooltipcheckbox否悬停时显示详细信息
chartOrientationselect否—
hoverAnimationcheckbox否悬停时动画显示矩形

响应格式

HTML 结果

JSON
{
  "result": "<div>Processed HTML content</div>",
  "error": "Error message (optional)",
  "message": "Notification message (optional)",
  "metadata": {
    "key": "value"
  }
}

MCP 集成

将此工具加入你的 Model Context Protocol 服务,让 AI 智能体可以列出并调用它。

服务配置

将以下内容加入你的 MCP 客户端配置:

mcp.json
{
  "mcpServers": {
    "elysiatools-icicle-chart-generator": {
      "name": "icicle-chart-generator",
      "description": "生成交互式冰柱图用于层级数据可视化,非常适合显示树形结构、文件系统和组织架构",
      "baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=icicle-chart-generator",
      "command": "",
      "args": [],
      "env": {},
      "isActive": true,
      "type": "sse"
    }
  }
}

列出可用工具

连接到 SSE 端点后,列出已开放的工具:

tools/list
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/list"
}

调用此工具

通过工具 id 调用,参数由其参数表构建:

tools/call
{
  "jsonrpc": "2.0",
  "id": 2,
  "method": "tools/call",
  "params": {
    "name": "icicle-chart-generator",
    "arguments": {
  "chartData": "JSON format:\n{\n  &quot;name&quot;: &quot;Root&quot;,\n  &quot;value&quot;: 100,\n  &quot;children&quot;: [\n    {\n      &quot;name&quot;: &quot;Branch A&quot;,\n      &quot;value&quot;: 60,\n      &quot;children&quot;: [\n        {&quot;name&quot;: &quot;Leaf A1&quot;, &quot;value&quot;: 30},\n        {&quot;name&quot;: &quot;Leaf A2&quot;, &quot;value&quot;: 30}\n      ]\n    }\n  ]\n}",
  "chartTitle": "输入图表标题...",
  "colorScheme": "ocean",
  "customColors": "[\"#FF6B6B\", \"#4ECDC4\", \"#45B7D1\", \"#96CEB4\"]",
  "valueFormat": "number",
  "chartWidth": "600",
  "chartHeight": "500",
  "startLevel": "0",
  "maxDepth": "3",
  "labelSize": "12",
  "paddingSize": "2",
  "borderRadius": "4",
  "strokeWidth": "1",
  "backgroundColor": "#ffffff",
  "strokeColor": "#ffffff",
  "showLabels": true,
  "showValues": true,
  "showPercentages": false,
  "enableTooltip": true,
  "chartOrientation": "horizontal",
  "hoverAnimation": true
}
  }
}
可用逗号分隔的 toolId 在一个会话中串联多个工具,例如 /mcp/sse?toolId=png-to-webp,jpg-to-webp,gif-to-webp(最多 20 个)。

有问题或反馈?请联系 [email protected]

浏览工具
打开工具