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, F2 provides all the chart types you'll need. Our mobile design guidelines enable better user experience in mobile visualzation projects.
$ npm install @antv/f2
Born for mobile
- Design for mobile: make data more alive and chart interactions more natural.
Performance: small package size(version without interaction is 44k after gzip) with great rendering performance.
All the chart types you want
With the power of grammar of graphics, F2 supports data-driven 50+ chart types(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.
- 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: Ant Design Mobile Chart based on F2. (React).
- BizGoblin：Data visualization library based F2 and React.
- VChart: Mobile Chart Components based on vux and F2. (Vue).
- weex-chart: Chart components based on Weex and F2.
Or just scan the below qrcode to see demos in mobile:
;const data =year: '1951' sales: 38year: '1952' sales: 52year: '1956' sales: 61year: '1957' sales: 145year: '1958' sales: 48year: '1959' sales: 38year: '1960' sales: 38year: '1962' sales: 38;const chart =id: 'mountNode'width: 375height: 265pixelRatio: windowdevicePixelRatio;chartsourcedata;chart;chart;
$ 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 for bug reports or suggestions first.
To become a contributor, please follow our contributing guide.
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.