Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: 添加 website #1368

Merged
merged 7 commits into from
Jul 31, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
node_modules
dist/
test
build/
4 changes: 3 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
"@typescript-eslint/no-inferrable-types": 0,
"@typescript-eslint/explicit-function-return-type": 0,
"@typescript-eslint/type-annotation-spacing": 0,
"@typescript-eslint/no-empty-function": 1
"@typescript-eslint/no-empty-function": 1,
"no-undef": 0,
"@typescript-eslint/no-var-requires": 0
hustcc marked this conversation as resolved.
Show resolved Hide resolved
}
}
18 changes: 0 additions & 18 deletions .umirc.ts

This file was deleted.

74 changes: 0 additions & 74 deletions docs/demos/scatter.md

This file was deleted.

25 changes: 0 additions & 25 deletions docs/index.md

This file was deleted.

14 changes: 14 additions & 0 deletions docs/manual/contact.en.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
title: 联系我们
order: 7
---

如果你有任何的问题、建议、反馈或者交流意愿,可以通过如下方式联系我们:

- 官方推荐 [GitHub issues](https://github.com/antvis/G2Plot/issues)

- 邮件:antv@antfin.com

- 语雀专栏:https://www.yuque.com/antv

- 知乎专栏:https://zhuanlan.zhihu.com/aiux-antv
14 changes: 14 additions & 0 deletions docs/manual/contact.zh.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
title: 联系我们
order: 7
---

如果你有任何的问题、建议、反馈或者交流意愿,可以通过如下方式联系我们:

- 官方推荐 [GitHub issues](https://github.com/antvis/G2Plot/issues)

- 邮件:antv@antfin.com

- 语雀专栏:https://www.yuque.com/antv

- 知乎专栏:https://zhuanlan.zhihu.com/aiux-antv
12 changes: 12 additions & 0 deletions docs/manual/getting-started.en.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
title: 快速上手
order: 1
---

## 安装

### 浏览器引入

### 通过 npm 安装

### 快速使用
12 changes: 12 additions & 0 deletions docs/manual/getting-started.zh.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
title: 快速上手
order: 1
---

## 安装

### 浏览器引入

### 通过 npm 安装

### 快速使用
70 changes: 70 additions & 0 deletions docs/manual/introduction.en.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
---
title: 简介
order: 0
redirect_from:
- /en/docs/manual
---

g2plot 是一套简单、易用、并具备一定扩展能力和组合能力的统计图表库,基于图形语法理论搭建而成,"g2plot"中的 g2 即意指图形语法 (the Gramma of Graphics),同时也致敬了 ggplot2。

## 特性

- 📦 开箱即用、默认好用的高质量统计图表

- 🎨 提炼自企业级产品的视觉语言和设计规范

- 📊 响应式图表:致力于解决图表在任何数据和显示尺寸下的基本可读性问题

- 🔳 图层化设计方法:在 g2plot 体系下,图表不仅仅只是各不相关的实例,图层概念的引入提供了多图表组合叠联动,共同讲述一个数据故事的可能性

<img src="https://gw.alipayobjects.com/mdn/rms_d314dd/afts/img/A*sXqrRrEwFRQAAAAAAAAAAABkARQnAQ" width="800">
hustcc marked this conversation as resolved.
Show resolved Hide resolved

## 安装

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

## 使用

<img src="https://gw.alipayobjects.com/mdn/rms_d314dd/afts/img/A*37siRJftYDIAAAAAAAAAAABkARQnAQ" width="450">
lxfu1 marked this conversation as resolved.
Show resolved Hide resolved

```html
<div id="c1"></div>
```

```js
import { Bar } from '@antv/g2plot';

const data = [
{ year: '1951 年', sales: 38 },
{ year: '1952 年', sales: 52 },
{ year: '1956 年', sales: 61 },
{ year: '1957 年', sales: 145 },
{ year: '1958 年', sales: 48 },
];

const barPlot = new Bar('c1', {
data,
xField: 'sales',
yField: 'year',
colorField: 'year',
});

barPlot.render();
```

## 开发

```bash
$ npm install

# run test case
$ npm run test-live

# build watching file changes and run demos
$ npm run dev

# run demos
$ npm run demos
```
70 changes: 70 additions & 0 deletions docs/manual/introduction.zh.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
---
title: 简介
order: 0
redirect_from:
- /zh/docs/manual
---

g2plot 是一套简单、易用、并具备一定扩展能力和组合能力的统计图表库,基于图形语法理论搭建而成,"g2plot"中的 g2 即意指图形语法 (the Gramma of Graphics),同时也致敬了 ggplot2。

## 特性

- 📦 开箱即用、默认好用的高质量统计图表

- 🎨 提炼自企业级产品的视觉语言和设计规范

- 📊 响应式图表:致力于解决图表在任何数据和显示尺寸下的基本可读性问题

- 🔳 图层化设计方法:在 g2plot 体系下,图表不仅仅只是各不相关的实例,图层概念的引入提供了多图表组合叠联动,共同讲述一个数据故事的可能性

<img src="https://gw.alipayobjects.com/mdn/rms_d314dd/afts/img/A*sXqrRrEwFRQAAAAAAAAAAABkARQnAQ" width="800">
hustcc marked this conversation as resolved.
Show resolved Hide resolved

## 安装

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

## 使用

<img src="https://gw.alipayobjects.com/mdn/rms_d314dd/afts/img/A*37siRJftYDIAAAAAAAAAAABkARQnAQ" width="450">
hustcc marked this conversation as resolved.
Show resolved Hide resolved

```html
<div id="c1"></div>
```

```js
import { Bar } from '@antv/g2plot';

const data = [
{ year: '1951 年', sales: 38 },
{ year: '1952 年', sales: 52 },
{ year: '1956 年', sales: 61 },
{ year: '1957 年', sales: 145 },
{ year: '1958 年', sales: 48 },
];

const barPlot = new Bar('c1', {
data,
xField: 'sales',
yField: 'year',
colorField: 'year',
});

barPlot.render();
```

## 开发

```bash
$ npm install

# run test case
$ npm run test-live

# build watching file changes and run demos
$ npm run dev

# run demos
$ npm run demos
```
6 changes: 6 additions & 0 deletions docs/manual/plots/scatter.en.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
title: Scatter
order: 1
---

# 快速上手
53 changes: 53 additions & 0 deletions docs/manual/plots/scatter.zh.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
---
title: Scatter - 散点图
order: 1
---

# 快速上手

```js
const data = [
{ year: '1991', value: 3 },
{ year: '1992', value: 4 },
{ year: '1993', value: 3.5 },
{ year: '1994', value: 5 },
{ year: '1995', value: 4.9 },
{ year: '1996', value: 6 },
{ year: '1997', value: 7 },
{ year: '1998', value: 9 },
{ year: '1999', value: 13 },
];
const scatter = new Scatter('container', {
width: 400,
height: 300,
appendPadding: 10,
data,
xField: 'year',
yField: 'value',
yAxis: {
nice: true,
},
});

scatter.render();
```

# 配置属性

## 图表容器

### width

**可选**, _number_

功能描述: 设置图表宽度。

默认配置: `400`

### height

**可选**, _number_

功能描述: 设置图表高度。

默认配置: `400`
Loading