$ npm install @antv/ava
English | 简体中文
@antv/ava is the core JS package of AVA, which contains four main modules:
Installation can be done via npm or the yarn package manager.
# npm
$ npm install @antv/ava --save
# yarn
$ yarn add @antv/ava
The following is a practical example of how the four main modules of @antv/ava can be used:
import { DataFrame, getInsights, ckb, Advisor } from '@antv/ava';
// input data
const data = [
{ price: 38, type: 'A' },
{ price: 52, type: 'B' },
{ price: 61, type: 'C' },
{ price: 145, type: 'D' },
{ price: 49, type: 'E' },
];
// 1. Data Processing Module
const df = new DataFrame(data);
const dataInfo = df.info();
// 2. Automatic Insights Module
const { insights } = getInsights(data);
// 3. Chart Knowledge Base Module
const myCkb = ckb();
// 4. Chart Advisor
const chartAdvisor = new Advisor();
// recommend charts and give optimization suggestions based on input data
const results = chartAdvisor.advise({ data });
For more examples, please refer to: AVA Site
We welcome all contributions. Please read our Contributing Guide first. You can submit any ideas as pull requests or as GitHub issues. Let's build a better AVA together.
More at Wiki: Development.
© 2010 - cnpmjs.org x YWFE | Home | YWFE