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 all commits
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.

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 alt="图片加载失败" src="https://gw.alipayobjects.com/mdn/rms_d314dd/afts/img/A*sXqrRrEwFRQAAAAAAAAAAABkARQnAQ" width="800">

## 安装

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

## 使用

<img alt="图片加载失败" src="https://gw.alipayobjects.com/mdn/rms_d314dd/afts/img/A*37siRJftYDIAAAAAAAAAAABkARQnAQ" width="450">

```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 alt="图片加载失败" src="https://gw.alipayobjects.com/mdn/rms_d314dd/afts/img/A*sXqrRrEwFRQAAAAAAAAAAABkARQnAQ" width="800">

## 安装

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

## 使用

<img alt="图片加载失败" src="https://gw.alipayobjects.com/mdn/rms_d314dd/afts/img/A*37siRJftYDIAAAAAAAAAAABkARQnAQ" width="450">

```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
```
7 changes: 7 additions & 0 deletions examples/gallery/index.en.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
title: 所有图表
order: -1
icon: other
redirect_from:
- /en/examples
---
7 changes: 7 additions & 0 deletions examples/gallery/index.zh.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
title: 所有图表
order: -1
icon: other
redirect_from:
- /zh/examples
---
15 changes: 15 additions & 0 deletions examples/scatter/basic/API.ch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
title: API
---

# 配置属性

## 图表容器

### width

**可选**, _number_

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

默认配置: `400`
Loading