Skip to content

Commit

Permalink
docs(ckb): api and readme
Browse files Browse the repository at this point in the history
  • Loading branch information
neoddish committed Feb 17, 2020
1 parent c33965f commit 25f1efb
Show file tree
Hide file tree
Showing 6 changed files with 149 additions and 5 deletions.
6 changes: 5 additions & 1 deletion API.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
# AVA API Reference

Currently, AVA only exposes the `autoChart()` method under the **Chart Advisor** module.
## API Documentation

For detailed API documentation, please check [`/docs/api`](./docs/api/index.md) .

## Chart Advisor

Currently, AVA only exposes the `autoChart()` method under the **Chart Advisor** module.

### Installation

```shell
Expand Down
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,27 @@
<img src="https://gw.alipayobjects.com/zos/antfincdn/QTJPYXJpjW/avademo.gif" alt="AVA demo">
</div>

## Packages

### 📦 [AVA/CKB](./packages/knowledge/README.md)

CKB stands for Chart Knowledge Base. This package is the KB where empirical knowledge about visualization and charts is stored. The chart recommendation is based on it.

At the same time, this package also facilitates us to develop products of chart type selection.


```js
@antv/knowledge
```

### 📦 AVA/DataWizard

DataWizard is a js/ts library for data processing. In the AVA framework, it is used to 'understand' the input dataset. However, it can also be used independently to develop some statistical or data mocking functions.

### 📦 AVA/ChartAdvisor

ChartAdvisor is the core component of AVA. It recommends charts based on dataset and analysis needs.

## Resources

- [API Reference](API.md)
Expand Down
6 changes: 3 additions & 3 deletions packages/knowledge/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<img src="https://gw.alipayobjects.com/zos/antfincdn/R8sN%24GNdh6/language.svg" width="18"> English
<img src="https://gw.alipayobjects.com/zos/antfincdn/R8sN%24GNdh6/language.svg" width="18"> English | [简体中文](./zh-CN/README.zh-CN.md)

<h1 align="center">
<p>Chart Knowledge Base (CKB)</p>
Expand All @@ -17,7 +17,7 @@ A knowledge base stores the wiki for every type of visualization.

Chart Knowledge Base (CKB) is a library offers knowledge base for chart wikis in a JSON format. The JSON is like this:

```json
```js
{
single_line_chart: {
id: 'single_line_chart',
Expand Down Expand Up @@ -78,7 +78,7 @@ const knowledgeBase = CKBJson();
const zhCompletedKB = CKBJson('zh-CN', true);
```

## API Reference
## Documentation

For more usages, please check the [API Reference](./API.md).

Expand Down
93 changes: 93 additions & 0 deletions packages/knowledge/zh-CN/README.zh-CN.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
<img src="https://gw.alipayobjects.com/zos/antfincdn/R8sN%24GNdh6/language.svg" width="18"> [English](../README.md) | 简体中文

<h1 align="center">
<p>Chart Knowledge Base (CKB)</p>
<span style="font-size: 24px;">AVA/knowledge</span>
</h1>

<div align="center">

数据可视化图表知识库

[![Version](https://badgen.net/npm/v/@antv/knowledge)](https://www.npmjs.com/@antv/knowledge)
[![NPM downloads](http://img.shields.io/npm/dm/@antv/knowledge.svg)](http://npmjs.com/@antv/knowledge)
![Latest commit](https://badgen.net/github/last-commit/antvis/knowledge)

</div>

Chart Knowledge Base (CKB) 是一个提供图表经验的知识库,它的形式基于 JSON。每个图表的知识结构类似这样:

```js
{
single_line_chart: {
id: 'single_line_chart',
name: 'Single Line Chart',
alias: ['Line', 'Line Chart', 'Basic Line Chart'],
family: ['LineCharts'],
def:
'A single line chart is a chart that uses one line with segments to show changes in data in a ordinal dimension.',
purpose: ['Trend'],
coord: ['Cartesian2D'],
category: ['Statistic'],
shape: ['Lines'],
dataPres: [
{ minQty: 1, maxQty: 1, fieldConditions: ['Time', 'Ordinal'] },
{ minQty: 1, maxQty: 1, fieldConditions: ['Interval'] },
],
channel: ['Position', 'Direction'],
},

...
}
```

## 特性

### 图表分类信息的一致性

CKB 希望能解决目前可视化研究环境(特别是中文环境)中概念、术语不统一的问题。降低领域内研究和讨论的沟通成本。

我们基于数据可视化社区来共建一个图表知识库。每个参与者都可以提出自己对于图表的认识。我们会一起讨论来制定图表的名称、定义、分类和各种属性。

### 快速构建图表选择类产品

使用 CKB,你可以快速开发诸如图表类型字典、图表筛选、图表百科之类的产品和应用。比如: <img src="https://gw.alipayobjects.com/zos/antfincdn/1yMwFkBvyV/chartcube-logo-cube.svg" width="18"> [ChartCube](https://chartcube.alipay.com/guide)

<div align="center">
<img src="https://gw.alipayobjects.com/zos/antfincdn/Q70gxQ1Tde/Screen%252520Shot%2525202020-02-18%252520at%2525207.14.29%252520AM.png" width="600" />
</div>

### 智能图表推荐的基石

AVA 的智能图表推荐的能力是以 CKB 为依托的。有了 CKB,你也可以在它的基础上,指定自定义规则,搭建自己的图表推荐系统。

## 安装

```bash
$ npm install @antv/knowledge
```

## 用法

```js
import { CKBJson } from '@antv/knowledge';


// 得到全量的英文图表知识库
const knowledgeBase = CKBJson();

// 得到只包含完整信息的图表构成的中文图表知识库
const zhCompletedKB = CKBJson('zh-CN', true);
```

## 文档

更多用法请见 [API Reference](../API.md).

## 证书

MIT

## 友情链接

<img src="https://gw.alipayobjects.com/zos/antfincdn/1yMwFkBvyV/chartcube-logo-cube.svg" width="18"> [ChartCube](https://chartcube.alipay.com/) - 基于 [G2Plot](https://github.com/antvis/G2Plot) 的在线图表制作工具,交互简单,一键导出图表代码!
6 changes: 5 additions & 1 deletion zh-CN/API.zh-CN.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
# AVA 接口文档

AVA 目前暂时只透出 **Chart Advisor** 模块下的 `autoChart()` 方法。
## 完整接口文档

如果想查看完整的接口文档,请点击这里 [`/docs/api`](./../docs/api/index.md).

## Chart Advisor

AVA 目前暂时只透出 **Chart Advisor** 模块下的 `autoChart()` 方法。

### 安装

```shell
Expand Down
22 changes: 22 additions & 0 deletions zh-CN/README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,28 @@
<img src="https://gw.alipayobjects.com/zos/antfincdn/QTJPYXJpjW/avademo.gif" alt="AVA demo">
</div>

##

### 📦 [AVA/CKB](./packages/knowledge/README.md)

CKB 的意思是 Chart Knowledge Base,也就是图表知识库。这个包中包含了基于经验总结的关于可视化和图表的各种基本知识和观察。图表的推荐必须基于这些基本概念。

同时,这个包也让开发图表类型筛选相关的产品变得非常简单。

```js
@antv/knowledge
```

### 📦 AVA/DataWizard

DataWizard 是一个 js/ts 的前端数据处理类库。在 AVA 的框架中,它被用来“理解”输入端的数据集。不过,它也可以独立地被用来开发一些数学统计、数据模拟之类的功能。

### 📦 AVA/ChartAdvisor

ChartAdvisor is the core component of AVA. It recommends charts based on dataset and analysis needs.

ChartAdvisor 是 AVA 的核心部分。它基于数据和分析需求来推荐图表类型和具体的图表细节设置。

## 资源

- [API 接口文档](API.zh-CN.md)
Expand Down

0 comments on commit 25f1efb

Please sign in to comment.