ngx-f2
Angular for Antvis F2
Demo
This is a fork of g2-angular by cipchk but for F2 instead check it out if you use G2
Install
ngx-f2
from npm.
1. You can install npm install ngx-f2 --save
f2
library in app via webpack bundler
or html
.
2. Important: You need install and include A: webpack bundler
npm install @antv/f2 --save
You can choose load f2
script file via .angular-cli.json
or Lazy load.
(Recommend)
// .angular-cli.json"scripts":
or
;
B: index.html
How to use it with:
options = height: 300 forceFit: true { const data = month: 'Jan' temperature: 70 month: 'Feb' temperature: 69 month: 'Mar' temperature: 95 month: 'Apr' temperature: 145 month: 'May' temperature: 182 month: 'Jun' temperature: 215 month: 'Jul' temperature: 252 month: 'Aug' temperature: 265 month: 'Sep' temperature: 233 month: 'Oct' temperature: 183 month: 'Nov' temperature: 139 month: 'Dec' temperature: 96 ; chartsourcedata month: alias: '月份' range: 0 1 temperature: alias: '平均温度(°C)' ; chart size2; chart; }
see the demo for more details
angular-cli
please refer to demo.
Troubleshooting
Please follow this guidelines when reporting bugs and feature requests:
- Use GitHub Issues board to report bugs and feature requests (not our email address)
- Please always write steps to reproduce the error. That way we can focus on fixing the bug, not scratching our heads trying to reproduce it.
Thanks for understanding!
License
The MIT License (see the LICENSE file for the full text)