Skip to content

Commit 73508f6

Browse files
authored
feat: add outputType schema for all chart tools (#24)
* feat: add all chart outputType schame * feat: update code schema * chore: update readme * chore: bump version 0.6.0
1 parent bc6b254 commit 73508f6

36 files changed

+257
-40
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,7 @@ npm run start
171171
- [2niuhe](https://github.com/2niuhe): Support MCP with SSE and Streaming HTTP. [#17](https://github.com/hustcc/mcp-echarts/issues/17)
172172
- [susuperli](https://github.com/susuperli): Use `MinIO` to save the chart image base64 and return the url. [#10](https://github.com/hustcc/mcp-echarts/issues/10)
173173
- [BQXBQX](https://github.com/BQXBQX): Use `@napi-rs/canvas` instead node-canvas. [#3](https://github.com/hustcc/mcp-echarts/issues/3)
174+
- [Meet-student](https://github.com/Meet-student): Add `outputType` schema for all chart tools. [#24](https://github.com/hustcc/mcp-echarts/issues/24)
174175
- [hustcc](https://github.com/hustcc): Initial the repo.
175176

176177

__tests__/schema/bar.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,12 @@
6868
"exclusiveMinimum": 0,
6969
"default": 800,
7070
"description": "Set the width of the chart, default is 800px."
71+
},
72+
"outputType": {
73+
"type": "string",
74+
"enum": ["png", "svg", "option"],
75+
"default": "png",
76+
"description": "The output type of the diagram. Can be 'png', 'svg' or 'option'. Default is 'png', 'png' will return the rendered PNG image, 'svg' will return the rendered SVG string, and 'option' will return the valid ECharts option."
7177
}
7278
},
7379
"required": ["data"],

__tests__/schema/boxplot.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,12 @@
5858
"exclusiveMinimum": 0,
5959
"default": 800,
6060
"description": "Set the width of the chart, default is 800px."
61+
},
62+
"outputType": {
63+
"type": "string",
64+
"enum": ["png", "svg", "option"],
65+
"default": "png",
66+
"description": "The output type of the diagram. Can be 'png', 'svg' or 'option'. Default is 'png', 'png' will return the rendered PNG image, 'svg' will return the rendered SVG string, and 'option' will return the valid ECharts option."
6167
}
6268
},
6369
"required": ["data"],

__tests__/schema/candlestick.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,12 @@
6565
"exclusiveMinimum": 0,
6666
"default": 800,
6767
"description": "Set the width of the chart, default is 800px."
68+
},
69+
"outputType": {
70+
"type": "string",
71+
"enum": ["png", "svg", "option"],
72+
"default": "png",
73+
"description": "The output type of the diagram. Can be 'png', 'svg' or 'option'. Default is 'png', 'png' will return the rendered PNG image, 'svg' will return the rendered SVG string, and 'option' will return the valid ECharts option."
6874
}
6975
},
7076
"required": ["data"],

__tests__/schema/funnel.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,12 @@
4444
"exclusiveMinimum": 0,
4545
"default": 800,
4646
"description": "Set the width of the chart, default is 800px."
47+
},
48+
"outputType": {
49+
"type": "string",
50+
"enum": ["png", "svg", "option"],
51+
"default": "png",
52+
"description": "The output type of the diagram. Can be 'png', 'svg' or 'option'. Default is 'png', 'png' will return the rendered PNG image, 'svg' will return the rendered SVG string, and 'option' will return the valid ECharts option."
4753
}
4854
},
4955
"required": ["data"],

__tests__/schema/gauge.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,12 @@
5454
"exclusiveMinimum": 0,
5555
"default": 800,
5656
"description": "Set the width of the chart, default is 800px."
57+
},
58+
"outputType": {
59+
"type": "string",
60+
"enum": ["png", "svg", "option"],
61+
"default": "png",
62+
"description": "The output type of the diagram. Can be 'png', 'svg' or 'option'. Default is 'png', 'png' will return the rendered PNG image, 'svg' will return the rendered SVG string, and 'option' will return the valid ECharts option."
5763
}
5864
},
5965
"required": ["data"],

__tests__/schema/graph.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,12 @@
8888
"exclusiveMinimum": 0,
8989
"default": 800,
9090
"description": "Set the width of the chart, default is 800px."
91+
},
92+
"outputType": {
93+
"type": "string",
94+
"enum": ["png", "svg", "option"],
95+
"default": "png",
96+
"description": "The output type of the diagram. Can be 'png', 'svg' or 'option'. Default is 'png', 'png' will return the rendered PNG image, 'svg' will return the rendered SVG string, and 'option' will return the valid ECharts option."
9197
}
9298
},
9399
"required": ["data"],

__tests__/schema/heatmap.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,12 @@
5858
"exclusiveMinimum": 0,
5959
"default": 800,
6060
"description": "Set the width of the chart, default is 800px."
61+
},
62+
"outputType": {
63+
"type": "string",
64+
"enum": ["png", "svg", "option"],
65+
"default": "png",
66+
"description": "The output type of the diagram. Can be 'png', 'svg' or 'option'. Default is 'png', 'png' will return the rendered PNG image, 'svg' will return the rendered SVG string, and 'option' will return the valid ECharts option."
6167
}
6268
},
6369
"required": ["data"],

__tests__/schema/line.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,12 @@
7676
"exclusiveMinimum": 0,
7777
"default": 800,
7878
"description": "Set the width of the chart, default is 800px."
79+
},
80+
"outputType": {
81+
"type": "string",
82+
"enum": ["png", "svg", "option"],
83+
"default": "png",
84+
"description": "The output type of the diagram. Can be 'png', 'svg' or 'option'. Default is 'png', 'png' will return the rendered PNG image, 'svg' will return the rendered SVG string, and 'option' will return the valid ECharts option."
7985
}
8086
},
8187
"required": ["data"],

__tests__/schema/parallel.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,12 @@
5555
"exclusiveMinimum": 0,
5656
"default": 800,
5757
"description": "Set the width of the chart, default is 800px."
58+
},
59+
"outputType": {
60+
"type": "string",
61+
"enum": ["png", "svg", "option"],
62+
"default": "png",
63+
"description": "The output type of the diagram. Can be 'png', 'svg' or 'option'. Default is 'png', 'png' will return the rendered PNG image, 'svg' will return the rendered SVG string, and 'option' will return the valid ECharts option."
5864
}
5965
},
6066
"required": ["data", "dimensions"],

0 commit comments

Comments
 (0)