Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

stock-chart/f2

Repository files navigation

F2: Mobile data visualization solution, pure in JavaScript

npm package NPM downloads Percentage of issues still open

δΈ­ζ–‡ README

F2 is a powerful mobile data visualization solution, pure in javascript. F2 is based on the grammar of graphics, and it is light-weighted, high-performance and easily expandable. Also, F2 charts are well desigbed for mobile.

Special thanks to Leland Wilkinson, the author of The Grammar Of Graphics, whose book served as the foundation for F2 and G2.

Installation

$ npm install @antv/f2

Features

  • βœ”οΈŽ Elegant user experience: Designed for mobile experience
  • βœ”οΈŽ Flexible: Customizable shapes and animations, flexible charting components, infinite creativity
  • βœ”οΈŽ High performance: F2 pursues the utltimate performance for drawing, lots of optimization have been done for mobile devices
  • βœ”οΈŽ Light-weighed: F2 maintains a compact code size while supporting more than 45 kinds of charts

Other runtime support

Website && Documentations

  • Chinese documents

  • English documents: on the way!

Demos

Or see demos in mobile:

Getting Started

<canvas id="c1"></canvas>
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: 'c1',
 width: 375,
 height: 265,
 pixelRatio: window.devicePixelRatio
});
chart.source(data);
chart.interval().position('year*sales');
chart.render();

Development

$ 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.

License

MIT license.

About

πŸ“± πŸ“Š πŸ“ˆ Charts for mobile visualization

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 99.0%
  • Other 1.0%

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /