@datafe-open/markdown-chart-table

中文文档
0.4.1发布于 2026/10/31MITTypeScriptESM + CJS构建来源已验证近 30 天下载 2680

用于 Markdown 图表的互动 AG Grid 社区表渲染器

中文使用文档

@ datafe- open/ markdown- 图表表

Markdown Chart的交互式桌面渲染器,以AG Grid社区为基础. 这个 支持键入排序和过滤器、按需快速搜索、绑定列, 结构化数字/日期格式化、变化指标、条、进度单元格、, 和内置SVG火花.

在构建自定义注册时直接安装 :

pnpm add ag-grid-community @datafe-open/markdown-chart-table
import { ChartRendererRegistry } from '@datafe-open/markdown-chart';
import {
  createTableDataViewProvider,
  createTableRenderer,
} from '@datafe-open/markdown-chart-table';

const registry = new ChartRendererRegistry();
const options = { resolveDataRef, validateDataRef };
registry.register(createTableRenderer(options));
registry.registerDataViewProvider(createTableDataViewProvider(options));

React 和 Vue 零配置组件注册两个集成 自动。 只有在用户打开表格数据时才装入提供者 视图。 如果无法加载,则核心 HTML 数据视图仍然可用.

使用 renderer: "table" 带有条形表格数据:

```markdown-chart
{
  "version": 1,
  "renderer": "table",
  "data": {
    "kind": "inline",
    "source": [
      { "region": "华东", "sales": 1280000, "growth": 0.18, "apr": 31, "may": 36, "jun": 42 },
      { "region": "华南", "sales": 960000, "growth": -0.04, "apr": 27, "may": 26, "jun": 25 }
    ]
  },
  "spec": {
    "title": "区域销售",
    "height": 420,
    "columns": [
      { "field": "region", "title": "区域", "pinned": "left" },
      { "field": "sales", "title": "销售额", "type": "number", "format": { "style": "currency", "currency": "CNY", "notation": "compact" } },
      { "field": "growth", "title": "同比", "type": "number", "format": { "style": "percent" }, "cell": { "kind": "change", "polarity": "higher-is-better" } },
      { "id": "trend", "title": "近三月", "cell": { "kind": "sparkline", "fields": ["apr", "may", "jun"], "labels": ["4月", "5月", "6月"], "scale": "column" } }
    ],
    "initialSort": [{ "field": "sales", "direction": "desc" }]
  }
}
```

columns 接受1–50个条目。 列可以绑定源 field,或使用 id 以导出一丝火花。 类型是 string, (中文(简体) ), number, (中文(简体) ), date,以及 boolean; 日期列需要ISO日期或带有时区的时间戳,并且是 在协调世界时显示。 只有在每个非正数值为时才会推断出数字 只有当每个非正数值为布尔时, 数字和布尔值才为布尔; 日期永远不会 推断.

默认的表格预算为一万行和20万个已实现单元格(row) 乘以源字段的结合)。 推导出列的上限为 50. 以 createTableRenderer({ limits }) 并传递同样的选项 createTableDataViewProvider从紧凑的页脚打开搜索并关闭 以 Escape 或 toggle 清除快速过滤器。 从 标题; 浮动过滤器输入被隐藏。 UI不提供导出. 现有 serializeTableCsv 求助者仍然可以求助.

版本与发布记录

@datafe-open/markdown-chart-table 共发布 7 个版本,首次发布于 2026/09/18;过去 12 个月发布了 7 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
0.4.1latest2026/10/3110 天前
0.4.02026/10/2220 天前
0.3.42026/09/221 个月前
0.3.32026/09/211 个月前
0.3.22026/09/201 个月前
0.3.12026/09/181 个月前

关于 @datafe-open/markdown-chart-table 的常见问题

@datafe-open/markdown-chart-table 是什么?

用于 Markdown 图表的互动 AG Grid 社区表渲染器

如何安装 @datafe-open/markdown-chart-table?

在项目目录运行 npm install @datafe-open/markdown-chart-table,或使用 pnpm add / yarn add / bun add。

@datafe-open/markdown-chart-table 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@datafe-open/markdown-chart-table 支持 ESM 还是 CommonJS?

同时提供 ES Module 与 CommonJS 入口,import 和 require() 都可以使用,打包工具会自动选择合适的版本。

@datafe-open/markdown-chart-table 可以商用吗?

@datafe-open/markdown-chart-table 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@datafe-open/markdown-chart-table 的下载量有多少?

根据 npm 官方下载统计,@datafe-open/markdown-chart-table 在 2026/10/12 – 2026/11/10 这 30 天内被下载 2,680 次,日均约 89 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@datafe-open/markdown-chart-table 还在维护吗?

最新版本 0.4.1 发布于 2026/10/31(10 天前);至今共发布 7 个版本,其中过去 12 个月发布了 7 个;首次发布于 2026/09/18。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。