← 返回 Skills 市场
dachunggan

Chart Renderer Open

作者 Sexy Coder · GitHub ↗ · v1.0.1 · MIT-0
cross-platform ⚠ suspicious
83
总下载
0
收藏
0
当前安装
2
版本数
在 OpenClaw 中安装
/install chart-renderer-open
功能描述
Render structured data into polished, self-contained HTML pages with heatmaps, trend lines, category cards, styled tables, and more. Screenshot/download read...
使用说明 (SKILL.md)

Chart Renderer Open

A modular, registry-driven chart generator for AI agents. Produces self-contained HTML pages with styled charts and tables — no backend required.

Design philosophy: Only load the CSS/JS/docs for chart types actually used, minimizing token waste. All information is statically readable with no hover dependency.

Available Chart Types

type Name Description
heatmap Matrix Heatmap Table Multi-row x multi-column numeric matrix with color-coded cells, change arrows, and trend badges
layered Tiered Category Cards Three-tier color-coded cards (green/blue/red) for categorizing items by performance level
direction Recommendation Cards Dual-column cards with auto-matched icons and color themes
line Multi-series Line Chart Chart.js multi-line chart with optional data labels
dualAxis Dual-axis Line Chart Chart.js dual Y-axis: primary series (area fill) + secondary series (dashed line)
table Styled Table Clean white-background table with auto-coloring for ↑/↓ prefixed cells
text Text Block Colored callout blocks: success (green) / warning (yellow) / danger (red)

Full data format specs are in templates/types/{type}.md — read on demand.

Execution Steps

Step 1: Determine required types

Based on the user's request, select the needed chart types from the table above.

Step 2: Read on demand

  1. Read skills/chart-renderer-open/templates/registry.json for file mappings
  2. Read skills/chart-renderer-open/templates/chart_page.html for the page skeleton
  3. Read skills/chart-renderer-open/templates/types/core.css for shared styles
  4. For each needed type, read its .md file for data format, its .css and .js for rendering code
    • When multiple types share a file (e.g., line and dualAxis share chart.css/chart.js), do not re-read

Step 3: Assemble data

Build the CFG and SECTIONS data structures per the .md format specs.

Data injection uses JSON. The skeleton template loads data via \x3Cscript type="application/json"> + JSON.parse. Both data placeholders must contain valid JSON strings (output of JSON.stringify()). This means:

  • Double quotes " in string values must be escaped as \"
  • Newlines must be escaped as \
  • Do not manually concatenate JS strings — construct JS objects then use JSON.stringify() to output

Step 4: Assemble HTML and replace placeholders

Placeholder Fill with
{{PAGE_TITLE}} Page title
\x3C!--__CDN_LIBS__*/ CDN scripts (include Chart.js + datalabels when line/dualAxis used; always include html2canvas)
/*__CORE_CSS__*/ core.css content
/*__TYPE_CSS__*/ Concatenated CSS for needed types
/*__TYPE_JS__*/ Concatenated JS for needed types
/*__CFG__*/{}/*__END__*/ JSON string of CFG object
/*__SECTIONS__*/[]/*__END__*/ JSON string of SECTIONS array

Step 5: Write and deliver

  1. Write to docs/{chart_types}_report_{year}_{month}_{day}_{hour}_{minute}_{second}.html (no zero-padding)
  2. Write to canvas hosted directory /home/admin/.openclaw/canvas/documents/report_{id}/index.html
  3. Include [embed ref="report_{id}" title="Report Preview" height="600" /] in reply for inline preview

Adding New Chart Types

  1. Create {typeName}.css, {typeName}.js, {typeName}.md under types/
  2. In the JS file, call registerRenderer('typeName', renderFn) or registerRenderer('typeName', renderFn, afterRenderFn)
  3. Add a mapping entry in registry.json
  4. Add a row to the "Available Chart Types" table in this file

Notes

  • Do not fabricate data the user has not provided
  • Heatmap: requires at least 2 rows + 2 columns
  • Line charts: require at least 2 data points
  • Color scale: \x3C30% dark red / 30-45% light red / 45-55% yellow / 55-70% light green / >=70% dark green
安全使用建议
Use this skill only with data you trust, or sanitize/escape all report text before generating the HTML. Before sharing or opening reports from untrusted inputs, inspect the final HTML and ensure any required Chart.js/html2canvas libraries come from pinned, trusted sources.
能力评估
Purpose & Capability
The files coherently implement an HTML chart/report renderer, but report data is directly inserted into HTML, creating a browser script-injection risk when data comes from untrusted sources.
Instruction Scope
The instructions are mainly scoped to reading the skill's own templates and assembling a report, but they do not clearly require HTML escaping or sanitization before rendering user-provided values.
Install Mechanism
There is no installer or required binary, but the runtime HTML references browser libraries such as html2canvas and Chart.js without bundled or pinned sources in the provided artifacts.
Credentials
No credentials, environment variables, privileged local paths, or external service access are requested.
Persistence & Privilege
No background persistence, privilege escalation, or autonomous activity is shown; outputs appear limited to generated HTML, browser printing, and user-triggered image download.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install chart-renderer-open
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /chart-renderer-open 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.1
Restructure: nest skill folder for git/clawhub separation
v1.0.0
Initial release of chart-renderer-open. - Generate self-contained HTML reports with heatmaps, line charts, tables, and category cards from structured data. - Modular: loads only the CSS/JS/docs needed for the user's requested chart types. - Supports multiple chart types including heatmap, line, dual axis, recommendation cards, and tiered category cards. - One-click screenshot and download-ready reports, suitable for dashboards and analyses. - Full data and rendering specs provided via on-demand template files. - Simple export path with preview embed for generated reports.
元数据
Slug chart-renderer-open
版本 1.0.1
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 2
常见问题

Chart Renderer Open 是什么?

Render structured data into polished, self-contained HTML pages with heatmaps, trend lines, category cards, styled tables, and more. Screenshot/download read... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 83 次。

如何安装 Chart Renderer Open?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install chart-renderer-open」即可一键安装,无需额外配置。

Chart Renderer Open 是免费的吗?

是的,Chart Renderer Open 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Chart Renderer Open 支持哪些平台?

Chart Renderer Open 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Chart Renderer Open?

由 Sexy Coder(@dachunggan)开发并维护,当前版本 v1.0.1。

💬 留言讨论