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

Data Visualization

文氏图生成器

生成可自定义的文氏图,用于可视化集合关系、包含关系和层次结构

html· HTML 结果打开工具

快速开始

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

cURL
curl -X POST 'https://api.elysiatools.com/zh/api/tools/euler-diagram-generator' \
  -H 'Content-Type: application/json' \
  -d '{"chartData":"New simplified format:\n{\n  "element": [\n    {"name": "A", "count": 150},\n    {"name": "B", "count": 120},\n    {"name": "C", "count": 80}\n  ],\n  "Intersecting": [\n    {"names": "A,B", "count": 50}\n  ]\n}\n\nParent-child example (intersection equals smaller set):\n{\n  "element": [\n    {"name": "Animals", "count": 100},\n    {"name": "Mammals", "count": 80}\n  ],\n  "Intersecting": [\n    {"names": "Animals,Mammals", "count": 80}\n  ]\n}\n\nor simple text format:\nA|150\nB|120\nC|80","chartTitle":"输入图表标题...","borderStyle":"solid","colorScheme":"default","customColors":"#3b82f6,#ef4444,#10b981","circleOpacity":"0.4","fontSize":"14","chartWidth":"700","chartHeight":"600","animationDuration":"1200","backgroundColor":"#ffffff","gridColor":"#f0f0f0","showGrid":false,"showLabels":true,"showValues":true,"showLegend":true}'

© 2026 Elysia Tools. 开发者文档。

返回主站浏览工具

API 参考

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

请求端点

HTTP
POST https://api.elysiatools.com/zh/api/tools/euler-diagram-generator

请求参数

参数名类型必填说明
chartDatatextarea是韦恩图的简化格式。布局自动检测:交集等于较小集合→父子关系;否则为相交;3+个集合无交集→不相交。
chartTitletext否显示在图表上方的标题
borderStyleselect否—
colorSchemeselect否—
customColorstext否集合的自定义十六进制颜色(逗号分隔)。覆盖配色方案。
circleOpacitynumber否圆形的透明度(0.2到1.0)
fontSizenumber否标签的像素字体大小
chartWidthnumber否图表的像素宽度
chartHeightnumber否图表的像素高度
animationDurationnumber否动画的毫秒时长
backgroundColorcolor否图表容器的背景颜色
gridColorcolor否背景网格的颜色
showGridcheckbox否显示背景网格以便更好定位
showLabelscheckbox否在图表上显示集合名称
showValuescheckbox否在圆形中显示元素数量
showLegendcheckbox否在图表下方显示图例

响应格式

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-euler-diagram-generator": {
      "name": "euler-diagram-generator",
      "description": "生成可自定义的文氏图,用于可视化集合关系、包含关系和层次结构",
      "baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=euler-diagram-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": "euler-diagram-generator",
    "arguments": {
  "chartData": "New simplified format:\n{\n  &quot;element&quot;: [\n    {&quot;name&quot;: &quot;A&quot;, &quot;count&quot;: 150},\n    {&quot;name&quot;: &quot;B&quot;, &quot;count&quot;: 120},\n    {&quot;name&quot;: &quot;C&quot;, &quot;count&quot;: 80}\n  ],\n  &quot;Intersecting&quot;: [\n    {&quot;names&quot;: &quot;A,B&quot;, &quot;count&quot;: 50}\n  ]\n}\n\nParent-child example (intersection equals smaller set):\n{\n  &quot;element&quot;: [\n    {&quot;name&quot;: &quot;Animals&quot;, &quot;count&quot;: 100},\n    {&quot;name&quot;: &quot;Mammals&quot;, &quot;count&quot;: 80}\n  ],\n  &quot;Intersecting&quot;: [\n    {&quot;names&quot;: &quot;Animals,Mammals&quot;, &quot;count&quot;: 80}\n  ]\n}\n\nor simple text format:\nA|150\nB|120\nC|80",
  "chartTitle": "输入图表标题...",
  "borderStyle": "solid",
  "colorScheme": "default",
  "customColors": "#3b82f6,#ef4444,#10b981",
  "circleOpacity": "0.4",
  "fontSize": "14",
  "chartWidth": "700",
  "chartHeight": "600",
  "animationDuration": "1200",
  "backgroundColor": "#ffffff",
  "gridColor": "#f0f0f0",
  "showGrid": false,
  "showLabels": true,
  "showValues": true,
  "showLegend": true
}
  }
}
可用逗号分隔的 toolId 在一个会话中串联多个工具,例如 /mcp/sse?toolId=png-to-webp,jpg-to-webp,gif-to-webp(最多 20 个)。

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

浏览工具
打开工具