# F2 **Repository Path**: OpenSourceProject_FY24/f2 ## Basic Information - **Project Name**: F2 - **Description**: 基于 HTML5 Canvas,开箱即用的移动端可视化解决方案 - **Primary Language**: JavaScript - **License**: MIT - **Default Branch**: master - **Homepage**: https://antv.alipay.com/zh-cn/f2/3.x/index.html - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 122 - **Created**: 2024-12-20 - **Last Updated**: 2024-12-20 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README  [](https://travis-ci.org/antvis/f2)   [](https://www.npmjs.com/package/@antv/f2) [](https://npmjs.org/package/@antv/f2) [](http://isitmaintained.com/project/antvis/f2 'Percentage of issues still open') F2,一个专注于移动,开箱即用的可视化解决方案,完美支持 H5 环境同时兼容多种环境(node, 小程序,weex)。完备的图形语法理论,满足你的各种可视化需求。专业的移动设计指引为你带来最佳的移动端图表体验。[英文 README](./README.en-US.md)








## 文档
- [使用教程](https://f2.antv.vision/zh/docs/tutorial/getting-started)
- [API](https://f2.antv.vision/zh/docs/api)
- [图表示例](https://f2.antv.vision/zh/examples)
## 快速开始
```html
```
```jsx
// F2 对数据源格式的要求,仅仅是 JSON 数组,数组的每个元素是一个标准 JSON 对象。
const data = [
{ genre: 'Sports', sold: 275 },
{ genre: 'Strategy', sold: 115 },
{ genre: 'Action', sold: 120 },
{ genre: 'Shooter', sold: 350 },
{ genre: 'Other', sold: 150 },
];
// 获取 canvas context
const context = document.getElementById('mountNode').getContext('2d');
const { props } = (
);
const canvas = new Canvas(props);
canvas.render();
```
更多示例:[demos](https://f2.antv.vision/zh/examples)。
**手机扫码观看 demos**
## 本地开发
```bash
$ npm install
# 先初始化 monorepo
$ npm run bootstrap
# 再跑测试用例
$ npm run test
# 监听文件变化构建,并打开 demo 页面
$ npm run dev
# 打开某一个具体的测试用例
$ npm run test-watch -- 'TestFileName'
```
## 如何贡献
如果您在使用的过程中碰到问题,可以先通过 [issues](https://github.com/antvis/f2/issues) 看看有没有类似的 bug 或者建议。
如需提交代码,请遵从我们的[贡献指南](https://github.com/antvis/f2/blob/master/CONTRIBUTING.md)。
## 体验改进计划说明
F2 从 3.1.12(2018-06-20 发布)版本开始添加了`F2.track(true)`方法。 目前我们的体验改进计划已经完成,所以从 3.3.4 版本开始该方法将从 F2 中删除。 如果它给你带来麻烦,我们深表歉意。
## License
[MIT license](./LICENSE).