Chart.js README

The project's README from github.com/chartjs/Chart.js. As one markdown file: README.md.

https://www.chartjs.org/
Simple yet flexible JavaScript charting for designers & developers

Downloads GitHub Workflow Status Coverage Awesome Discord

Documentation

All the links point to the new version 4 of the lib.

In case you are looking for an older version of the docs, you will have to specify the specific version in the url like this: https://www.chartjs.org/docs/2.9.4/

Contributing

Instructions on building and testing Chart.js can be found in the documentation. Before submitting an issue or a pull request, please take a moment to look over the contributing guidelines first. For support, please post questions on Stack Overflow with the chart.js tag.

License

Chart.js is available under the MIT license.

Chart.js (chartjs/Chart.js)

Searching Database…

67.7K ·GitHub
这是什么?Chart.js 是一个 JavaScript 库,借助 HTML5 canvas 元素绘制简单、灵活的图表。
它是框架还是库?它是一个渲染库,而不是完整的框架:你先创建一个 canvas 元素,再调用 Chart.js 在上面绘制图表。
我该怎么把它添加到项目中?可以通过包管理器安装,也可以直接引入,然后按照文档中的入门指南创建第一个图表。
运行它还需要其他库吗?它只依赖一个小型的 @kurkle/color 包;不需要后端、构建工具或框架。
使用旧版本时需要注意什么吗?文档中的默认链接指向 v4;如果你使用的是较旧的版本,必须在文档 URL 中明确指定该版本。
它能在哪里运行?它可以在任何支持 HTML5 canvas 元素的现代网页浏览器中运行。
它开箱即支持哪些图表类型?文档中的相关主题总体上涉及图表与坐标轴的配置;Chart.js 常见的内置图表类型包括折线图、柱状图、饼图、环形图、雷达图和散点图,可通过文档中的“图表”和“坐标轴”章节进行配置。
我可以用插件扩展它吗?可以。文档中有一个专门的“热门扩展”章节,列出了一些社区插件,可用来添加更多图表类型和功能。
通常如何从源代码构建?它使用 pnpm 配合 Rollup 进行打包(pnpm run build),并使用 TypeScript 生成类型声明文件。
What are similar projects?lightweight-charts, uPlot, d3, echarts, G2, charts, Vela, G6
Creator
chartjs
Size
43.2 MB
Stars
67.7K
Age
13y
Commits · 90 Days