In the DSH ecosystem, plugins are responsible for extending functionality. After an Agent processes data, generating visual charts directly in the conversation context is more efficient than copying data to an external tool. dsh-chartlab is designed precisely for this purpose, allowing users to transform data from local data files or a DuckDB database into interactive charts.

Core Features

The plugin supports the following verified capabilities:

  • Data source support: Local data files (.csv, .xlsx, .xls) or DuckDB databases (.duckdb, .ddb).
  • Chart types: Line charts and scatter plots.
  • Interactions: Box selection zoom, mouse wheel zoom, drag pan, hover value display, and screenshot download.
  • Data filtering: Supports conditional filtering (equal, not equal, range, multi-select), and date range filtering.
  • Data grouping: Group by a specified column; different values correspond to separate lines.
  • SQL queries: Supports writing and executing SQL statements directly in the chart.
  • Theme and language: Charts automatically follow DSH’s language settings (Chinese/English) and theme settings (dark/light).
  • Session isolation: Each conversation has an independent chart cache; deleting a session automatically clears the cache.

Installation and Enablement

Before enabling the plugin, review the source code and license (MIT). The installation command is as follows:

dsh plugin --profile web add dsh-chartlab

Typical Usage

After installation, enter the command directly in the conversation to generate a chart.

  1. Using a CSV file:
    用 dsh-chartlab 插件绘制 `/path/to/your-data.csv` 的图表
  1. Using an Excel file:
    用 dsh-chartlab 插件绘制 `/path/to/your-data.xlsx` 的图表
  1. Using a DuckDB database:
    用 dsh-chartlab 插件绘制 `/path/to/your-data.duckdb` 中 `sales` 表的图表
*Note: The DuckDB table name can be omitted; the plugin automatically reads the first table.*

Notes

The following known limitations currently exist and are planned optimization items:

  • Excel performance: Excel files currently use full synchronous loading; performance for large files needs optimization (streaming reads are planned on the roadmap).
  • Excel worksheets: Currently only the first worksheet is read (multi-worksheet support is planned on the roadmap).

Summary

dsh-chartlab focuses on solving the visualization of data generated by Agents. By supporting SQL, grouping, and filtering, it provides a flexible data analysis workspace. It aligns with DSH’s “everything is a plugin” ecosystem philosophy and suits developers and data analysts who need to quickly inspect data distributions within a conversation flow.