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

Data Visualization

步进图生成器

创建阶梯式数据可视化图表,完美展示离散数据随时间的变化

html· HTML 结果打开工具

快速开始

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

cURL
curl -X POST 'https://api.elysiatools.com/zh/api/tools/step-chart-generator' \
  -H 'Content-Type: application/json' \
  -d '{"chartTitle":"输入图表标题...","dataPoints":"JSON format example:\n[{"x": "Jan", "y": 100, "label": "January"},\n{"x": "Feb", "y": 150, "label": "February"},\n{"x": "Mar", "y": 120, "label": "March"},\n{"x": "Apr", "y": 180, "label": "April"}]","xAxisLabel":"X Axis","yAxisLabel":"Y Axis","stepStyle":"step-before","lineColor":"#3b82f6","lineWidth":"2","pointColor":"#3b82f6","pointSize":"4","showDataPoints":true,"showLabels":false,"showGrid":true,"fillArea":false,"areaColor":"#3b82f6","gridColor":"#e0e0e0","backgroundColor":"#ffffff","chartWidth":"800","chartHeight":"500","dataLabelFormat":"number","fontSize":"12","titleSize":"18","fontFamily":"Arial","animationEnabled":true,"animationDuration":"1000"}'

© 2026 Elysia Tools. 开发者文档。

返回主站浏览工具

API 参考

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

请求端点

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

请求参数

参数名类型必填说明
chartTitletext否显示在步进图上方的标题
dataPointstextarea是JSON数组格式的数据点,包含x、y和可选标签属性
xAxisLabeltext否X轴的标签
yAxisLabeltext否Y轴的标签
stepStyleselect是—
lineColorcolor否步进线的颜色
lineWidthnumber否步进线的像素宽度
pointColorcolor否数据点的颜色
pointSizenumber否数据点的像素大小
showDataPointscheckbox否在步进线上显示数据点
showLabelscheckbox否在数据点上显示数值标签
showGridcheckbox否显示背景网格线
fillAreacheckbox否用颜色填充步进线下方的区域
areaColorcolor否区域填充的颜色(如果启用)
gridColorcolor否网格线的颜色
backgroundColorcolor否图表的背景颜色
chartWidthnumber否图表的像素宽度
chartHeightnumber否图表的像素高度
dataLabelFormatselect否—
fontSizenumber否标签和文本的字体大小
titleSizenumber否图表标题的字体大小
fontFamilytext否文本元素的字体族
animationEnabledcheckbox否加载时动画显示图表
animationDurationnumber否动画持续时间(毫秒)

响应格式

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-step-chart-generator": {
      "name": "step-chart-generator",
      "description": "创建阶梯式数据可视化图表,完美展示离散数据随时间的变化",
      "baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=step-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": "step-chart-generator",
    "arguments": {
  "chartTitle": "输入图表标题...",
  "dataPoints": "JSON format example:\n[{&quot;x&quot;: &quot;Jan&quot;, &quot;y&quot;: 100, &quot;label&quot;: &quot;January&quot;},\n{&quot;x&quot;: &quot;Feb&quot;, &quot;y&quot;: 150, &quot;label&quot;: &quot;February&quot;},\n{&quot;x&quot;: &quot;Mar&quot;, &quot;y&quot;: 120, &quot;label&quot;: &quot;March&quot;},\n{&quot;x&quot;: &quot;Apr&quot;, &quot;y&quot;: 180, &quot;label&quot;: &quot;April&quot;}]",
  "xAxisLabel": "X Axis",
  "yAxisLabel": "Y Axis",
  "stepStyle": "step-before",
  "lineColor": "#3b82f6",
  "lineWidth": "2",
  "pointColor": "#3b82f6",
  "pointSize": "4",
  "showDataPoints": true,
  "showLabels": false,
  "showGrid": true,
  "fillArea": false,
  "areaColor": "#3b82f6",
  "gridColor": "#e0e0e0",
  "backgroundColor": "#ffffff",
  "chartWidth": "800",
  "chartHeight": "500",
  "dataLabelFormat": "number",
  "fontSize": "12",
  "titleSize": "18",
  "fontFamily": "Arial",
  "animationEnabled": true,
  "animationDuration": "1000"
}
  }
}
可用逗号分隔的 toolId 在一个会话中串联多个工具,例如 /mcp/sse?toolId=png-to-webp,jpg-to-webp,gif-to-webp(最多 20 个)。

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

浏览工具
打开工具