Skip to content

Commit 4e2c047

Browse files
lxfu1liufu.lf
and
liufu.lf
authored
feat: 添加 website (#1368)
* feat: 添加 website * feat: 添加 website * docs: Documentation modify * fix: Resolve conversation * docs: ch -> zh * docs: Remove useless docs Co-authored-by: liufu.lf <[email protected]>
1 parent b0f2a4b commit 4e2c047

24 files changed

+1052
-120
lines changed

.eslintignore

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
node_modules
2+
dist/
3+
test
4+
build/

.eslintrc

+3-1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@
2929
"@typescript-eslint/no-inferrable-types": 0,
3030
"@typescript-eslint/explicit-function-return-type": 0,
3131
"@typescript-eslint/type-annotation-spacing": 0,
32-
"@typescript-eslint/no-empty-function": 1
32+
"@typescript-eslint/no-empty-function": 1,
33+
"no-undef": 0,
34+
"@typescript-eslint/no-var-requires": 0
3335
}
3436
}

.umirc.ts

-18
This file was deleted.

docs/demos/scatter.md

-74
This file was deleted.

docs/index.md

-25
This file was deleted.

docs/manual/introduction.en.md

+70
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
---
2+
title: 简介
3+
order: 0
4+
redirect_from:
5+
- /en/docs/manual
6+
---
7+
8+
g2plot 是一套简单、易用、并具备一定扩展能力和组合能力的统计图表库,基于图形语法理论搭建而成,"g2plot"中的 g2 即意指图形语法 (the Gramma of Graphics),同时也致敬了 ggplot2。
9+
10+
## 特性
11+
12+
- 📦 开箱即用、默认好用的高质量统计图表
13+
14+
- 🎨 提炼自企业级产品的视觉语言和设计规范
15+
16+
- 📊 响应式图表:致力于解决图表在任何数据和显示尺寸下的基本可读性问题
17+
18+
- 🔳 图层化设计方法:在 g2plot 体系下,图表不仅仅只是各不相关的实例,图层概念的引入提供了多图表组合叠联动,共同讲述一个数据故事的可能性
19+
20+
<img alt="图片加载失败" src="https://gw.alipayobjects.com/mdn/rms_d314dd/afts/img/A*sXqrRrEwFRQAAAAAAAAAAABkARQnAQ" width="800">
21+
22+
## 安装
23+
24+
```bash
25+
$ npm install @antv/g2plot
26+
```
27+
28+
## 使用
29+
30+
<img alt="图片加载失败" src="https://gw.alipayobjects.com/mdn/rms_d314dd/afts/img/A*37siRJftYDIAAAAAAAAAAABkARQnAQ" width="450">
31+
32+
```html
33+
<div id="c1"></div>
34+
```
35+
36+
```js
37+
import { Bar } from '@antv/g2plot';
38+
39+
const data = [
40+
{ year: '1951 年', sales: 38 },
41+
{ year: '1952 年', sales: 52 },
42+
{ year: '1956 年', sales: 61 },
43+
{ year: '1957 年', sales: 145 },
44+
{ year: '1958 年', sales: 48 },
45+
];
46+
47+
const barPlot = new Bar('c1', {
48+
data,
49+
xField: 'sales',
50+
yField: 'year',
51+
colorField: 'year',
52+
});
53+
54+
barPlot.render();
55+
```
56+
57+
## 开发
58+
59+
```bash
60+
$ npm install
61+
62+
# run test case
63+
$ npm run test-live
64+
65+
# build watching file changes and run demos
66+
$ npm run dev
67+
68+
# run demos
69+
$ npm run demos
70+
```

docs/manual/introduction.zh.md

+70
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
---
2+
title: 简介
3+
order: 0
4+
redirect_from:
5+
- /zh/docs/manual
6+
---
7+
8+
g2plot 是一套简单、易用、并具备一定扩展能力和组合能力的统计图表库,基于图形语法理论搭建而成,"g2plot"中的 g2 即意指图形语法 (the Gramma of Graphics),同时也致敬了 ggplot2。
9+
10+
## 特性
11+
12+
- 📦 开箱即用、默认好用的高质量统计图表
13+
14+
- 🎨 提炼自企业级产品的视觉语言和设计规范
15+
16+
- 📊 响应式图表:致力于解决图表在任何数据和显示尺寸下的基本可读性问题
17+
18+
- 🔳 图层化设计方法:在 g2plot 体系下,图表不仅仅只是各不相关的实例,图层概念的引入提供了多图表组合叠联动,共同讲述一个数据故事的可能性
19+
20+
<img alt="图片加载失败" src="https://gw.alipayobjects.com/mdn/rms_d314dd/afts/img/A*sXqrRrEwFRQAAAAAAAAAAABkARQnAQ" width="800">
21+
22+
## 安装
23+
24+
```bash
25+
$ npm install @antv/g2plot
26+
```
27+
28+
## 使用
29+
30+
<img alt="图片加载失败" src="https://gw.alipayobjects.com/mdn/rms_d314dd/afts/img/A*37siRJftYDIAAAAAAAAAAABkARQnAQ" width="450">
31+
32+
```html
33+
<div id="c1"></div>
34+
```
35+
36+
```js
37+
import { Bar } from '@antv/g2plot';
38+
39+
const data = [
40+
{ year: '1951 年', sales: 38 },
41+
{ year: '1952 年', sales: 52 },
42+
{ year: '1956 年', sales: 61 },
43+
{ year: '1957 年', sales: 145 },
44+
{ year: '1958 年', sales: 48 },
45+
];
46+
47+
const barPlot = new Bar('c1', {
48+
data,
49+
xField: 'sales',
50+
yField: 'year',
51+
colorField: 'year',
52+
});
53+
54+
barPlot.render();
55+
```
56+
57+
## 开发
58+
59+
```bash
60+
$ npm install
61+
62+
# run test case
63+
$ npm run test-live
64+
65+
# build watching file changes and run demos
66+
$ npm run dev
67+
68+
# run demos
69+
$ npm run demos
70+
```

examples/gallery/index.en.md

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
title: 所有图表
3+
order: -1
4+
icon: other
5+
redirect_from:
6+
- /en/examples
7+
---

examples/gallery/index.zh.md

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
title: 所有图表
3+
order: -1
4+
icon: other
5+
redirect_from:
6+
- /zh/examples
7+
---

examples/scatter/basic/API.ch.md

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
title: API
3+
---
4+
5+
# 配置属性
6+
7+
## 图表容器
8+
9+
### width
10+
11+
**可选**, _number_
12+
13+
功能描述: 设置图表宽度。
14+
15+
默认配置: `400`

0 commit comments

Comments
 (0)