diff --git a/API.md b/API.md index c4385d10c..192478525 100644 --- a/API.md +++ b/API.md @@ -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 diff --git a/README.md b/README.md index 3f878d13d..0ee39e2e9 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,27 @@ AVA demo +## 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) diff --git a/packages/knowledge/README.md b/packages/knowledge/README.md index bee2f3480..a5434ffa6 100644 --- a/packages/knowledge/README.md +++ b/packages/knowledge/README.md @@ -1,4 +1,4 @@ - English + English | [简体中文](./zh-CN/README.zh-CN.md)

Chart Knowledge Base (CKB)

@@ -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', @@ -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). diff --git a/packages/knowledge/zh-CN/README.zh-CN.md b/packages/knowledge/zh-CN/README.zh-CN.md new file mode 100644 index 000000000..106e01291 --- /dev/null +++ b/packages/knowledge/zh-CN/README.zh-CN.md @@ -0,0 +1,93 @@ + [English](../README.md) | 简体中文 + +

+

Chart Knowledge Base (CKB)

+ AVA/knowledge +

+ +
+ +数据可视化图表知识库 + +[![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) + +
+ +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,你可以快速开发诸如图表类型字典、图表筛选、图表百科之类的产品和应用。比如: [ChartCube](https://chartcube.alipay.com/guide) + +
+ +
+ +### 智能图表推荐的基石 + +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 + +## 友情链接 + + [ChartCube](https://chartcube.alipay.com/) - 基于 [G2Plot](https://github.com/antvis/G2Plot) 的在线图表制作工具,交互简单,一键导出图表代码! diff --git a/zh-CN/API.zh-CN.md b/zh-CN/API.zh-CN.md index 937f21c03..a97eef6f1 100644 --- a/zh-CN/API.zh-CN.md +++ b/zh-CN/API.zh-CN.md @@ -1,9 +1,13 @@ # AVA 接口文档 -AVA 目前暂时只透出 **Chart Advisor** 模块下的 `autoChart()` 方法。 +## 完整接口文档 + +如果想查看完整的接口文档,请点击这里 [`/docs/api`](./../docs/api/index.md). ## Chart Advisor +AVA 目前暂时只透出 **Chart Advisor** 模块下的 `autoChart()` 方法。 + ### 安装 ```shell diff --git a/zh-CN/README.zh-CN.md b/zh-CN/README.zh-CN.md index 73f3c9840..1b4dd2913 100644 --- a/zh-CN/README.zh-CN.md +++ b/zh-CN/README.zh-CN.md @@ -24,6 +24,28 @@ AVA demo +## 包 + +### 📦 [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)