[Feature] Support for LLM-optimized Declarative Protocol (ECharts-Lite) in Markdown/JSON

オープン
#21,592 コメント 1 件 リアクション 1 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
25/100
issue の種類
機能追加
明瞭さ
説明が足りない
活発さ
静か
技術スタック
json, markdown, typescript

調査の方向性

Start with the proposed echarts.renderLite(dom, liteOption, theme) entry point and the echarts-lite/v1 schema described in the issue. Define the Markdown/JSON input and strict validation boundaries, then trace how chart types and dataset dimensions should expand into an ECharts option. Done means a consistent protocol with smart defaults and clear validation errors.

索引モデルが issue の本文から書いたものです。

説明

en new-feature pending
What problem does this feature solve?

[Context & Rationale]
With the rapid integration of Large Language Models (LLMs) into data analysis and BI tools, ECharts has become a primary target for AI-generated visualizations. However, there is a significant "impedance mismatch" between LLM outputs and the current ECharts option structure. The existing API, while powerful and comprehensive, is highly verbose for LLMs, leading to frequent "hallucinations" in nested JSON structures, high token consumption, and instability in rendering styling details.

[End User Experience]
The goal is to enable a "Zero-Config" experience for AI-native applications. Developers should be able to pass a simplified, intent-based Markdown or JSON structure directly from the LLM to ECharts. The renderer should intelligently handle the "boilerplate" (like tooltips, basic axis styling, and grid layouts) based on the chart type and data, allowing the LLM to focus solely on the data and the high-level visual intent.

[Why it cannot be easily dealt with existing APIs]
While users can write custom "translation" layers, every developer is currently reinventing the wheel. A fragmented ecosystem of "ECharts-Lite" parsers leads to inconsistent user experiences across different AI platforms. By introducing a standardized, declarative "Lite" protocol within the ECharts ecosystem, we can:

Lower the barrier for AI agents to interact with ECharts.

Optimize performance by reducing the payload size in LLM streaming.

Ensure visual consistency by separating data (from LLM) and theme/style (from the developer/ECharts defaults).

What does the proposed API look like?

We propose a Simplified Declarative Schema (e.g., echarts-lite) that can be used either as a standalone JSON or within a Markdown code block. This schema prioritizes a flat structure and the dataset component.

Proposed Schema Example:

JSON
{
"protocol": "echarts-lite/v1",
"type": "line",
"title": "User Growth Trend",
"data": [
["Month", "Users", "Retention"],
["2025-01", 150, 0.85],
["2025-02", 230, 0.82],
["2025-03", 224, 0.88]
],
"options": {
"smooth": true,
"stack": false,
"showSymbol": "auto"
},
"enhance": ["tooltip", "legend", "toolbox"]
}
Implementation Suggestion:
A new static method or a lightweight plugin, e.g., echarts.renderLite(dom, liteOption, theme), which:

Expands the lite protocol into a full echarts.option object internally.

Injects smart defaults for missing UI configurations (e.g., automatically generating series based on the data dimensions).

Validates the input using a strict JSON Schema to provide clear error messages for LLM debugging.

主要言語
TypeScript
スター
67.7k
フォーク
19.9k
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

apache/echarts のほかの issue

apache/echarts の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。