![](https://user-images.githubusercontent.com/6628666/44565549-4ab5d480-a79b-11e8-8d75-11420845efc0.png)
[![](https://img.shields.io/travis/antvis/f2.svg)](https://travis-ci.org/antvis/f2)
![](https://img.shields.io/badge/language-javascript-red.svg)
![](https://img.shields.io/badge/license-MIT-000000.svg)
[![npm package](https://img.shields.io/npm/v/@antv/f2.svg)](https://www.npmjs.com/package/@antv/f2)
[![NPM downloads](http://img.shields.io/npm/dm/@antv/f2.svg)](https://npmjs.org/package/@antv/f2)
[![Percentage of issues still open](http://isitmaintained.com/badge/open/antvis/f2.svg)](http://isitmaintained.com/project/antvis/f2 "Percentage of issues still open")
<p align="left">
<a href="https://twitter.com/intent/tweet?text=Introducing%20F2,%20an%20elegant,%20interactive%20and%20flexible%20charting%20library%20for%20mobile.&url=https://medium.com/@SimaZwx/https-medium-com-simazwx-introducing-f2-c44fb4e74c2d&hashtags=javascript,mobile,charts,dataviz,visualization,F2"><img src="https://img.shields.io/twitter/url/http/shields.io.svg?style=social"> </a>
</p>
[中文 README](./README.zh-CN.md)
F2 is **born for mobile**, developed for developers as well as designers. It is Html5 Canvas-based, and is also compatible with Node.js, Weex and React Native. Based on [the grammar of graphics](https://www.cs.uic.edu/~wilkinson/TheGrammarOfGraphics/GOG.html), F2 provides all the chart types you'll need. Our mobile design guidelines enable better user experience in mobile visualzation projects.
<p align="center"><a href="https://antv.alipay.com/zh-cn/f2/3.x/demo/index.html"><img src="https://user-images.githubusercontent.com/6628666/44565498-f4e12c80-a79a-11e8-98fc-73ee58547dc9.png" /></a></p>
> Special thanks to [Leland Wilkinson](https://en.wikipedia.org/wiki/Leland_Wilkinson), the author of [*The Grammar Of Graphics*](https://www.cs.uic.edu/~wilkinson/TheGrammarOfGraphics/GOG.html), whose book served as the foundation for F2 and G2.
## Installation
```bash
$ npm install @antv/f2
```
## Features
### Born for mobile
- **Design for mobile**: make data more alive and chart interactions more natural.
<p align="left"><img src="https://user-images.githubusercontent.com/6628666/44565525-21954400-a79b-11e8-8d69-cd95fa6b9a99.gif" width="600"></p>
<p align="left"><img src="https://user-images.githubusercontent.com/6628666/44565524-21954400-a79b-11e8-9aea-9e38d458e37b.gif" width="600" ></p>
- **Performance**: small package size(version without interaction is 44k after gzip) with great rendering performance.
- **Compatibility**: multi-end, Multi-runtime support. Besides H5 env, F2 can also run in [Node.js](https://antv.gitbook.io/f2/platform), [Weex rendering](https://github.com/weex-plugins/weex-chart) and [React Native](https://github.com/chenshuai2144/f2-demo), also [支付宝小程序](https://github.com/antvis/my-f2) and [微信小程序](https://github.com/antvis/wx-f2).
<p align="center"><img src="https://gw.alipayobjects.com/zos/rmsportal/cPUduuYgROeJwRJSRuFK.png"></p>
### All the chart types you want
With the power of grammar of graphics, F2 supports data-driven [50+ chart types](https://antv.alipay.com/zh-cn/f2/3.x/api/index.html)(the amount can be even more, which is depended on you) including classical charts such as line, column/bar chart, pie chart, scatter plot, gauges, etc. Additionally, F2 also provides feature-riched chart components, such as Tooltip, Legend and Guide.
### Flexible and Interactive
We also provide developers with flexible extension mechanisms, including shape, animation, and interactive customization capabilities, as well as flexible styling to meet a variety of personalized charting requirements.
<img src="https://user-images.githubusercontent.com/6628666/44565579-6c16c080-a79b-11e8-9494-86f3ad477341.gif" width="200"><img src="https://user-images.githubusercontent.com/6628666/44565581-6c16c080-a79b-11e8-8210-f4e797480e87.gif" width="200"><img src="https://user-images.githubusercontent.com/6628666/44565580-6c16c080-a79b-11e8-956d-4d15455468a3.gif" width="200"><img src="https://user-images.githubusercontent.com/6628666/44565583-6caf5700-a79b-11e8-8e9e-a1fa12ddcbf1.gif" width="200">
## Links
* [Website](https://antv.alipay.com/zh-cn/f2/3.x/index.html)
* English documents: https://antv.gitbook.io/f2/
* Chart demos: https://antv.alipay.com/zh-cn/f2/3.x/demo/index.html
* 中文文档: https://antv.alipay.com/zh-cn/f2/3.x/api/index.html
## Other libraries base on F2
* [ant-design-mobile-chart](https://github.com/ant-design/ant-design-mobile-chart): Ant Design Mobile Chart based on F2. (React).
* [BizGoblin](https://github.com/alibaba/BizGoblin):Data visualization library based F2 and React.
* [VChart](https://doc.vux.li/zh-CN/components/v-chart.html): Mobile Chart Components based on vux and F2. (Vue).
* [weex-chart](https://github.com/weex-plugins/weex-chart): Chart components based on Weex and F2.
## Demos
[Chart Demos](https://antv.alipay.com/zh-cn/f2/3.x/demo/index.html)
**Or just scan the below qrcode to see demos in mobile:**
<img src="https://gw.alipayobjects.com/zos/rmsportal/nzlxIzUBlBRVGMyaZigG.png" style="width:150px;">
## Getting Started
<img src="https://gw.alipayobjects.com/zos/rmsportal/NhtfmoKOInnHYrdWTfqh.png" width="375">
```html
<canvas id="mountNode"></canvas>
```
```js
import F2 from '@antv/f2';
const data = [
{ year: '1951', sales: 38 },
{ year: '1952', sales: 52 },
{ year: '1956', sales: 61 },
{ year: '1957', sales: 145 },
{ year: '1958', sales: 48 },
{ year: '1959', sales: 38 },
{ year: '1960', sales: 38 },
{ year: '1962', sales: 38 },
];
const chart = new F2.Chart({
id: 'mountNode',
width: 375,
height: 265,
pixelRatio: window.devicePixelRatio
});
chart.source(data);
chart.interval().position('year*sales');
chart.render();
```
## Development
```bash
$ npm install
# run test case
$ npm run test-live
# build watching file changes and run demos
$ npm run dev
# run demos
$ npm run demos
# run pack
$ npm run bundler
```
## How to Contribute
Please let us know how can we help. Do check out [issues](https://github.com/antvis/f2/issues) for bug reports or suggestions first.
To become a contributor, please follow our [contributing guide](https://github.com/antvis/f2/blob/master/CONTRIBUTING.md).
## Experience Improvement Program Description
Since version 3.1.12 (released on 2018-06-20), we add `F2.track(true)` method for our user experience improvement program. But now the program has finish, so we remove the method from F2 since version 3.3.4. We are very sorry if it has caused trouble for you.
## License
[MIT license](./LICENSE).
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
【资源说明】 1、该资源内项目代码都是经过测试运行成功,功能正常的情况下才上传的,请放心下载使用。 2、适用人群:主要针对计算机相关专业(如计科、信息安全、数据科学与大数据技术、人工智能、通信、物联网、数学、电子信息等)的同学或企业员工下载使用,具有较高的学习借鉴价值。 3、不仅适合小白学习实战练习,也可作为大作业、课程设计、毕设项目、初期项目立项演示等,欢迎下载,互相学习,共同进步!
资源推荐
资源详情
资源评论
收起资源包目录
共享记账小程序完整源码+说明(thinkphp5.1 php).zip (1992个子文件)
.babelrc 202B
.babelrc 181B
.babelrc 181B
.babelrc 167B
.babelrc 167B
.babelrc 167B
.babelrc 167B
.babelrc 126B
.babelrc 126B
.babelrc 126B
.bowerrc 26B
CNAME 13B
Gruntfile.coffee 3KB
jsdoc-default.css 6KB
default.css 6KB
qunit.css 4KB
prettify-tomorrow.css 2KB
index.css 2KB
index.css 2KB
index.css 2KB
index.css 2KB
index.css 2KB
prettify-jsdoc.css 1KB
style.css 725B
api.dust 772B
.editorconfig 372B
.editorconfig 372B
.editorconfig 372B
.editorconfig 372B
.editorconfig 372B
.editorconfig 372B
.editorconfig 372B
.editorconfig 372B
.editorconfig 372B
OpenSans-LightItalic-webfont.eot 20KB
OpenSans-Italic-webfont.eot 20KB
OpenSans-BoldItalic-webfont.eot 20KB
OpenSans-Regular-webfont.eot 19KB
OpenSans-Bold-webfont.eot 19KB
OpenSans-Light-webfont.eot 19KB
.eslintignore 105B
.eslintignore 63B
.eslintignore 63B
.eslintignore 63B
.eslintignore 63B
.eslintignore 49B
.eslintignore 49B
.eslintignore 49B
.eslintignore 49B
.eslintrc 527B
.eslintrc 527B
.eslintrc 527B
.eslintrc 527B
.eslintrc 305B
.eslintrc 297B
.eslintrc 297B
.eslintrc 297B
.eslintrc 297B
module-mat4.html 108KB
module-vec3.html 89KB
module-vec2.html 79KB
module-quat2.html 76KB
module-vec4.html 70KB
module-mat3.html 63KB
module-quat.html 58KB
module-mat2.html 49KB
module-mat2d.html 48KB
mat4.js.html 48KB
quat2.js.html 23KB
mat3.js.html 20KB
vec3.js.html 20KB
quat.js.html 17KB
vec4.js.html 15KB
vec2.js.html 15KB
index.html 13KB
mat2d.js.html 12KB
mat2.js.html 11KB
nested.html 8KB
module-glMatrix.html 7KB
visual.html 5KB
simulator.html 3KB
touchaction.html 3KB
simulator-googlemaps.html 3KB
common.js.html 3KB
multiple.html 2KB
log.html 2KB
input.html 2KB
index.html 1KB
index.html 1KB
index.html 661B
index.html 578B
compute_touch_action.html 551B
header.html 24B
wx-f2.js 521KB
f2-all.js 506KB
f2.js 366KB
index.js 315KB
lodash.compat.js 238KB
f2-simple.js 217KB
index.js 199KB
共 1992 条
- 1
- 2
- 3
- 4
- 5
- 6
- 20
资源评论
龙年行大运
- 粉丝: 1257
- 资源: 3844
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 汇编语言入门与编程实践-低层开发者的必备技能
- WatchIO二进制固件和刷机工具(无需源码编译).zip
- 提取网页核心信息:Python中的Readability与Date Extraction技术
- Swift语言教程:从基础语法到高级特性的全面讲解
- 表白代码(发射爱心).zip学习资料程序
- 常用工具合集(包括汉字转拼音工具、常用数据格式相互转换工具、尺寸相关的工具类).zip
- Delphi编程教程:从入门到精通Windows应用程序开发
- 视觉化编程入门指南:Visual Basic语言教程及其应用领域
- 纯代码实现的3d爱心.zip学习资料语言
- 儿童编程教育中Scratch语言的基础教学及实战示例
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功