# F2

📱📈An elegant, interactive and flexible charting library for mobile.

Repository: https://github.com/antvis/F2
Canonical: https://ross.abutalabs.com/products/f2
Homepage: https://f2.antv.antgroup.com/
Language: JavaScript
License: MIT
License Family: permissive
Topics: mobile, charts, visualization, grammar, antv, f2, html5-canvas, data-visualization, data-visualisation
Last push: 2026-05-19T10:57:41+00:00
Link (homepage): https://f2.antv.antgroup.com/
Link (site_page): https://f2.antv.antgroup.com/tutorial/getting-started

## Health v2 (maintenance only)
Score: 77/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 83, release rhythm 56, longevity 100
- inputs: {"age_days": 3656, "days_push": 106, "days_rel": 296, "gap_med": 27.5, "n_releases_24m": 7}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 7993, forks 640 (observed 2026-08-28T04:10:11.413127+00:00)

## What it is
F2 is a lightweight, interactive charting library from AntV focused on mobile data visualization, built on the Grammar of Graphics with a declarative JSX-based API. It renders 50+ chart types on HTML5 canvas and supports multiple environments including H5, Node.js, WeChat/Alipay mini-programs, React Native, and Weex.

## Use cases
- render interactive charts in a mobile web app
- add lightweight data visualization to a WeChat mini-program
- draw charts in React Native or Weex
- build custom chart types with a grammar of graphics library
- visualize financial data in a mobile app
- create small-bundle canvas charts for low-bandwidth mobile pages

## When to choose
- you need charts optimized for mobile devices with a small bundle size
- you target heterogeneous environments like mini-programs, H5, and Node.js with one codebase
- you want flexible, grammar-of-graphics-based chart composition rather than fixed chart templates
- you need fine-grained customization of shapes, animations, and interactions

## When to avoid
- you need desktop-first or server-side SVG charting with heavy dashboards
- you want a simple high-level chart API without learning a grammar-of-graphics model
- your project requires WebGL or 3D visualization
- you need a framework-agnostic non-JSX API only

## Facets
- artifact type: library
- maturity: active
- function: data-visualization, charts, ui-components
- domain: data-visualization, mobile-development, frontend, web-development
- platform: cross-platform, browser
- tags: mobile-charts, canvas, grammar-of-graphics, jsx, miniprogram, antv, h5, react-native, weex, mobile, nodejs, web-server

## Member repositories
- antvis/F2 (main) score 77
- antvis/wx-f2 (sdk) score 32

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:10:11.413127+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:32:33.222811+00:00, confidence not recorded.
  - readme: https://github.com/antvis/F2 (fetched 2026-08-28T04:10:11.413127+00:00, sha a3447b9c804a)
  - homepage: https://f2.antv.antgroup.com/ (fetched 2026-08-29T08:30:16.600214+00:00, sha a010d724023a)
  - site_page: https://f2.antv.antgroup.com/tutorial/getting-started (fetched 2026-08-29T08:30:16.609916+00:00, sha e2d1bfc4f91a)
- Data as of 2026-08-30T08:39:29.467469+00:00.
