short for | : | Data-Driven Documents |
是什么 ? | : | a JavaScript library for visualizing data using web standards. D3 helps you bring data to life using SVG, Canvas and HTML. D3 combines powerful visualization and interaction techniques with a data-driven approach to DOM manipulation, giving you the full capabilities of modern browsers and the freedom to design the right visual interface for your data. |
开发语言 | : | JavaScript |
官方主页 | : | https://d3js.org |
源码仓库 | : | https://github.com/d3/d3 |
jsDelivr⤵︎
<script src="https://cdn.jsdelivr.net/npm/d3@5.16.0/dist/d3.min.js"></script>
BootCDN⤵︎
<script src="https://cdn.bootcss.com/d3/5.16.0/d3.min.js"></script>
step1、通过包管理器
安装d3.js
包管理器 | 安装命令 |
---|---|
bower | bower install d3 --save |
npm | npm install d3 --save |
yarn | yarn add d3 |
step2、在HTML代码中引入JavaScript
<script src="/bower_components/d3/d3.min.js"></script>