diff --git a/docs/manual/plots/waterfall.zh.md b/docs/manual/plots/waterfall.zh.md
index 1f7883ff55..a79c874105 100644
--- a/docs/manual/plots/waterfall.zh.md
+++ b/docs/manual/plots/waterfall.zh.md
@@ -1,7 +1,16 @@
---
title: 瀑布图
order: 9
+contributors:
+ [
+ {
+ author: '新茗',
+ github: 'visiky',
+ avatar: 'https://gw.alipayobjects.com/zos/antfincdn/KAeYPA3TV0/avatar.jpeg',
+ },
+ ]
---
+
From 14679d5591e0b96fc7499f5e15fae90064b1e86a Mon Sep 17 00:00:00 2001
From: visiky <736929286@qq.com>
Date: Wed, 21 Apr 2021 11:10:41 +0800
Subject: [PATCH 2/2] =?UTF-8?q?docs:=20=E7=BD=91=E7=AB=99=E5=AF=BC?=
=?UTF-8?q?=E8=88=AA=E5=A2=9E=E5=8A=A0=E5=91=A8=E8=BE=B9=E7=94=9F=E6=80=81?=
=?UTF-8?q?=20&=20=E8=A1=A5=E5=85=85=E9=9D=A2=E7=A7=AF=E5=9B=BE=E7=89=B9?=
=?UTF-8?q?=E6=80=A7demo?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
docs/manual/plots/area.en.md | 8 ++++
docs/manual/plots/area.zh.md | 24 +++++-----
.../demo/area-with-line-annotation.ts | 44 +++++++++++++++++++
.../annotation/demo/line-annotation.ts | 18 --------
examples/component/annotation/demo/meta.json | 8 ++++
gatsby-config.js | 17 +++++--
6 files changed, 87 insertions(+), 32 deletions(-)
create mode 100644 examples/component/annotation/demo/area-with-line-annotation.ts
diff --git a/docs/manual/plots/area.en.md b/docs/manual/plots/area.en.md
index cf1bb228ca..f42bff6bce 100644
--- a/docs/manual/plots/area.en.md
+++ b/docs/manual/plots/area.en.md
@@ -118,4 +118,12 @@ fetch('https://gw.alipayobjects.com/os/bmw-prod/360c3eae-0c73-46f0-a982-4746a609
🎨 For an overview of the area plot options see the [API reference](/en/docs/api/plots/area)。
+## Area features
+
+### Add median line annotations
+
+- Add a median line to the area plot by using `annotations`.
+
+
+
diff --git a/docs/manual/plots/area.zh.md b/docs/manual/plots/area.zh.md
index df768bb50f..fecd0739c7 100644
--- a/docs/manual/plots/area.zh.md
+++ b/docs/manual/plots/area.zh.md
@@ -2,13 +2,7 @@
title: 面积图
order: 5
contributors:
- [
- {
- author: '新茗',
- github: 'visiky',
- avatar: 'https://gw.alipayobjects.com/zos/antfincdn/KAeYPA3TV0/avatar.jpeg',
- },
- ]
+ [{ author: '新茗', github: 'visiky', avatar: 'https://gw.alipayobjects.com/zos/antfincdn/KAeYPA3TV0/avatar.jpeg' }]
---
@@ -104,8 +98,10 @@ fetch('https://gw.alipayobjects.com/os/bmw-prod/360c3eae-0c73-46f0-a982-4746a609
data,
xField: 'timePeriod',
yField: 'value',
- xAxis: {
- range: [0, 1],
+ meta: {
+ timePeriod: {
+ range: [0, 1],
+ },
},
});
area.render();
@@ -118,4 +114,12 @@ fetch('https://gw.alipayobjects.com/os/bmw-prod/360c3eae-0c73-46f0-a982-4746a609
🎨 面积图详细的配置参考 [API 文档](/zh/docs/api/plots/area)。
-
\ No newline at end of file
+## 面积图特性
+
+### 添加中位线标注
+
+- 通过 `annotations` 可以给面积图增加图表标注
+
+
+
+
diff --git a/examples/component/annotation/demo/area-with-line-annotation.ts b/examples/component/annotation/demo/area-with-line-annotation.ts
new file mode 100644
index 0000000000..c419a06d27
--- /dev/null
+++ b/examples/component/annotation/demo/area-with-line-annotation.ts
@@ -0,0 +1,44 @@
+import { Area } from '@antv/g2plot';
+
+fetch('https://gw.alipayobjects.com/os/bmw-prod/1d565782-dde4-4bb6-8946-ea6a38ccf184.json')
+ .then((res) => res.json())
+ .then((data) => {
+ const plot = new Area('container', {
+ data,
+ padding: 'auto',
+ xField: 'Date',
+ yField: 'scales',
+ meta: {
+ Date: {
+ range: [0.02, 0.98],
+ },
+ },
+ yAxis: {
+ grid: null,
+ },
+ smooth: true,
+ annotations: [
+ {
+ type: 'line',
+ /** 起始位置 */
+ start: ['min', 'median'],
+ /** 结束位置 */
+ end: ['max', 'median'],
+ text: {
+ content: '中位线',
+ position: 'right',
+ offsetY: 18,
+ style: {
+ textAlign: 'right',
+ },
+ },
+ style: {
+ lineWidth: 0.5,
+ lineDash: [4, 4],
+ },
+ },
+ ],
+ });
+
+ plot.render();
+ });
diff --git a/examples/component/annotation/demo/line-annotation.ts b/examples/component/annotation/demo/line-annotation.ts
index 626880201e..e1f3a99eff 100644
--- a/examples/component/annotation/demo/line-annotation.ts
+++ b/examples/component/annotation/demo/line-annotation.ts
@@ -15,24 +15,6 @@ fetch('https://gw.alipayobjects.com/os/bmw-prod/1d565782-dde4-4bb6-8946-ea6a38cc
},
smooth: true,
annotations: [
- {
- type: 'line',
- /** 起始位置 */
- start: ['min', 'median'],
- /** 结束位置 */
- end: ['max', 'median'],
- text: {
- content: '中位线',
- position: 'right',
- offsetY: 18,
- style: {
- textAlign: 'right',
- },
- },
- style: {
- lineDash: [4, 4],
- },
- },
{
type: 'line',
/** 起始位置 */
diff --git a/examples/component/annotation/demo/meta.json b/examples/component/annotation/demo/meta.json
index f51ed8830e..bc425daecb 100644
--- a/examples/component/annotation/demo/meta.json
+++ b/examples/component/annotation/demo/meta.json
@@ -12,6 +12,14 @@
},
"screenshot": "https://gw.alipayobjects.com/mdn/rms_d314dd/afts/img/A*d8s-RrJb-xcAAAAAAAAAAAAAARQnAQ"
},
+ {
+ "filename": "area-with-line-annotation.ts",
+ "title": {
+ "zh": "带中位线标注的面积图",
+ "en": "Area with line annotation"
+ },
+ "screenshot": "https://gw.alipayobjects.com/zos/antfincdn/xSfk26S6da/2415772d-efc8-462a-846c-155dc15eb8cb.png"
+ },
{
"filename": "line-annotation1.ts",
"title": {
diff --git a/gatsby-config.js b/gatsby-config.js
index 8759aa2673..92e974b8bc 100644
--- a/gatsby-config.js
+++ b/gatsby-config.js
@@ -55,12 +55,21 @@ module.exports = {
},
order: 0,
},
+ ],
+ ecosystems: [
{
- slug: 'https://charts.ant.design/',
- title: {
- zh: 'React 版本',
- en: 'React Version',
+ name: {
+ zh: 'Ant Design Charts(React)',
+ en: 'Ant Design Charts (React)',
+ },
+ url: 'https://charts.ant.design/',
+ },
+ {
+ name: {
+ zh: 'G2Plot 可视化圈子(博客文章)',
+ en: 'Blog posts of G2Plot',
},
+ url: 'https://www.yuque.com/antv/g2plot',
},
],
docs: [