feat: add default params + transfer vchart.min.js to cdn

This commit is contained in:
ZJU_czx
2025-04-03 21:20:28 +08:00
parent 0971678eef
commit 391ca78207
2 changed files with 6 additions and 5 deletions
@@ -195,7 +195,11 @@ Outputs:
return {"observation": f"{success_template}"}
async def execute(
self, json_path: str, output_type: str, tool_type: str, language: str
self,
json_path: str,
output_type: str | None = "html",
tool_type: str | None = "visualization",
language: str | None = "en",
) -> str:
try:
logger.info(f"📈 data_visualization with {json_path} in: {tool_type} ")
@@ -58,10 +58,7 @@ async function getHtmlVChart(spec: any, width?: number, height?: number) {
<html>
<head>
<title>VChart 示例</title>
<script src="${path.join(
__dirname,
"../node_modules/@visactor/vchart/build/index.min.js"
)}"></script>
<script src="https://unpkg.com/@visactor/vchart@1.13.8/build/index.min.js"></script>
</head>
<body>
<div id="chart-container" style="width: ${