登录 注册
其他 chartgraphhacktoberfestjavascriptsvgsvg-chart
15,096
Stars
757
Forks
210
Watchers
146
Open Issues
MIT
许可证
JavaScript
语言
2017-10-26
创建时间
2026-10-19
最近更新

项目能做什么

零依赖、响应式的现代化轻量级 SVG 图表库。
来源:AI 基于仓库事实生成 · 内容以仓库实际 README 为准

使用说明 查看原始 README 原仓库文档

中文使用说明暂未生成。下面保留原仓库 README 摘录,命令与配置均以原文为准。
原始 README 摘录(英文原文,节选前 3000 字符)
<div align="center" markdown="1">
    
<img width="80" alt="charts-logo" src="https://github.com/user-attachments/assets/37b7ffaf-8354-48f2-8b9c-fa04fae0135b" />
    
# Frappe Charts
**GitHub-inspired modern, intuitive and responsive charts with zero dependencies**

<p align="center">
    <a href="https://bundlephobia.com/result?p=frappe-charts">
        <img src="https://img.shields.io/bundlephobia/minzip/frappe-charts">
    </a>
</p>

<img src=".github/example.gif">

<div>

[Explore Demos](https://frappe.io/charts) - [Edit at CodeSandbox](https://codesandbox.io/s/frappe-charts-demo-viqud) - [Documentation](https://frappe.io/charts/docs)  

</div>

</div>

## Frappe Charts
Frappe Charts is a simple charting library with a focus on a simple API. The design is inspired by various charts you see on GitHub.

### Motivation

ERPNext needed a simple sales history graph for its user company master to help users track sales. While using c3.js for reports, the library didn’t align well with our product’s classic design. Existing JS libraries were either too complex or rigid in their structure and behavior. To address this, I decided to create a library for translating value pairs into relative shapes or positions, focusing on simplicity.

### Key Features

- **Variety of chart types**: Frappe Charts supports various chart types, including Axis Charts, Area and Trends, Bar, Line, Pie, Percentage, Mixed Axis, and Heatmap.
- **Annotations and tooltips**: Charts can be annotated with x and y markers, regions, and tooltips for enhanced data context and clarity.
- **Dynamic data handling**: Add, remove, or update individual data points in place, or refresh the entire dataset to reflect changes.
- **Customizable configurations**: Flexible options like colors, animations, and custom titles allow for a highly personalized chart experience.

## Usage

```sh
npm install frappe-charts
```

Import in your project:
```js
import { Chart } from 'frappe-charts'
// or esm import
import { Chart } from 'frappe-charts/dist/frappe-charts.esm.js'
// import css
import 'frappe-charts/dist/frappe-charts.min.css'
```

Or directly include script in your HTML

```html
<script src="https://unpkg.com/frappe-charts@1.6.1/dist/frappe-charts.min.umd.js"></script>
```


```js
const data = {
    labels: ["12am-3am", "3am-6pm", "6am-9am", "9am-12am",
        "12pm-3pm", "3pm-6pm", "6pm-9pm", "9am-12am"
    ],
    datasets: [
        {
            name: "Some Data", chartType: "bar",
            values: [25, 40, 30, 35, 8, 52, 17, -4]
        },
        {
            name: "Another Set", chartType: "line",
            values: [25, 50, -10, 15, 18, 32, 27, 14]
        }
    ]
}

const chart = new frappe.Chart("#chart", {  // or a DOM element,
                                            // new Chart() in case of ES6 module with above usage
    title: "My Awesome Chart",
    data: data,
    type: 'axis-mixed', // or 'bar', 'line', 'scatter', 'pie', 'percentage'
    height: 250,
    colors: ['#7
阅读完整原文

商业机会分析 AI 生成

邮件与PDF专用图表生成 API (Chart-as-an-Image API)

产品构想基于该项目轻量零依赖且原生输出 SVG 的特性,封装一个高性能的无头/服务端图表渲染云服务,将 JSON 数据转换为高质量 SVG/PNG 图片,专供交易邮件、周报和 PDF 报表直接引用。
核心功能RESTful URL 传参生成图表、SVG/PNG 双格式输出、暗黑模式切换、高并发缓存、带签名防盗链机制。
目标用户SaaS 后端开发者、数据分析师、EDM 营销工具开发者。
难度/周期中等 · 3 - 5 周 · 成本:低于 500 美元(轻量云服务器/Serverless 计算、对象存储、域名)
收费模式Freemium 模式:每月免费额度(如 1000 次请求),超量按 API 调用量订阅制收费(如 $9/月至 $49/月)。
竞争风险QuickChart 等竞品已占据先发市场份额;需要优化服务端渲染性能以防止 CPU 耗尽。
依据 AI推测

面向 Notion / 独立博客的免代码数据嵌入工具

产品构想利用其极轻量的 SVG 渲染引擎,构建一个可视化连接 Google Sheets/Airtable 的嵌入式图表生成器,专为 Notion、Substack、Webflow 等内容创作者提供无缝嵌入的轻量图表。
核心功能Google 表格自动同步、免代码配色与样式调整、一键生成 Notion Embed 链接、自适应移动端、极小脚本加载体积。
目标用户Notion 重度用户、自媒体创作者、独立博主、无代码工具搭建者。
难度/周期低 · 2 - 4 周 · 成本:低于 300 美元(静态前端托管 + 轻量 API 后端)
收费模式订阅制(提供更多图表数量、移除水印、自定义域名与实时数据刷新权限)。
竞争风险Notion 等平台自身生态演进可能推出官方轻量图表功能;用户客单价较低。
依据 尚需验证的假设

Frappe/Vue/React 现代高级仪表盘商业模板包

产品构想将 Frappe Charts 深度扩展,补充高级交互(缩放、区域高亮、动态流式数据)并与现代前端框架集成,打包成面向中小企业及独立开发者的专业管理后台 UI 套件与组件库。
核心功能预制多套商业仪表盘主题、开箱即用的 React/Vue3 封装组件、数据大屏自适应排版、一键导出 CSV/图片功能模块。
目标用户外包开发团队、企业内部管理后台开发者、独立开发者。
难度/周期低至中等 · 4 - 6 周 · 成本:低于 200 美元(主要是设计素材与展示站搭建)
收费模式一次性买断制(单项目授权 / 商业团队无限授权)。
竞争风险前端图表及模板市场极度内卷,竞争对手多采用功能更全的 Chart.js 或 ECharts。
依据 数据支持的判断
AI 基于仓库公开数据分析生成,含推测成分,不构成收益承诺。
报告会保存到 个人中心

竞品与相似项目 GitHub Search 真实检索

项目中文简介Stars语言
d3/d3 中文介绍暂未生成
Bring data to life with SVG, Canvas and HTML. :bar_chart::ch
113,900 Shell
hugohe3/ppt-master 中文介绍暂未生成
AI turns documents or topics into real, native PowerPoint de
75,620 Python
chartjs/Chart.js 中文介绍暂未生成
Simple HTML5 Charts using the <canvas> tag
67,789 JavaScript
apache/echarts 中文介绍暂未生成
Apache ECharts is a powerful, interactive charting and data
67,703 TypeScript
metabase/metabase 中文介绍暂未生成
The easy-to-use open source Business Intelligence and Embedd
50,267 Clojure
PhilJay/MPAndroidChart 中文介绍暂未生成
A powerful 🚀 Android chart view / graph view library, suppor
38,186 Kotlin
以上为通过 GitHub 官方 Search API 检索的相似项目,功能差异与优劣势需进一步人工确认,配置 AI 后可生成对比分析。

项目优势与风险

技术成熟度创建于 2017-10-26,近 30 天仍在推送,发布过 18 个 Release
社区活跃Star 15,096 / Fork 757 / Issue 146(数据支持,可自行核实)
许可证MIT
主要风险上游项目方向可能变化;同赛道竞争者较多(见竞品表);热度与需求不完全等价

安装与使用

快速开始(以仓库 README 为准)
git clone https://github.com/frappe/charts.git
cd charts
# 请阅读仓库 README 获取确切安装步骤(依赖、配置、启动命令)
阅读原仓库文档
术语说明:Docker=应用容器(把程序和依赖打包运行);API Key=调用外部服务的密钥;Git Clone=把仓库代码下载到本地。常见错误:API Key 未配置 / 端口占用 / 数据库连接失败,多数项目在 README 的 Troubleshooting 章节有说明。