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

docs: upgrade api docs #2818

Merged
merged 8 commits into from Sep 14, 2020
Merged

docs: upgrade api docs #2818

merged 8 commits into from Sep 14, 2020

Conversation

BBSQQ
Copy link
Member

@BBSQQ BBSQQ commented Sep 10, 2020

Checklist
  • npm test passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines
Description of change

Rewrite api documents

Copy link

@accesslint accesslint bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are accessibility issues in these changes.

README.md Show resolved Hide resolved
@@ -27,7 +27,7 @@ G2 是一套基于图形语法理论的可视化底层引擎,以数据驱动

## 📺 线上示例

<a href="https://g2.antv.vision/zh/examples/gallery"><img src="https://user-images.githubusercontent.com/6628666/75466330-fe1d0c00-59c4-11ea-91ba-506f60ef8af4.png" /></a>
<a href="https://g2.antv.vision/zh/examples/gallery"><img src="https://user-images.githubusercontent.com/6628666/75466330-fe1d0c00-59c4-11ea-91ba-506f60ef8af4.png" style='width: 100%'/></a>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This image is missing a text alternative (alt attribute). This is a problem for people using screen readers.


| 默认交互 | 描述 | 效果展示 |
| ----------------- | ----------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- |
| tooltip | 鼠标在 chart 上移动时显示提示信息 | <img src="https://gw.alipayobjects.com/mdn/rms_f5c722/afts/img/A*UMsFRZwIDvMAAAAAAAAAAABkARQnAQ"> |
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This image is missing a text alternative (alt attribute). This is a problem for people using screen readers.

| 默认交互 | 描述 | 效果展示 |
| ----------------- | ----------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- |
| tooltip | 鼠标在 chart 上移动时显示提示信息 | <img src="https://gw.alipayobjects.com/mdn/rms_f5c722/afts/img/A*UMsFRZwIDvMAAAAAAAAAAABkARQnAQ"> |
| legend-active | 鼠标移动到图例选项时,图例项高亮,对应的图形高亮 | <img src="https://gw.alipayobjects.com/mdn/rms_f5c722/afts/img/A*fjkTR70h9YAAAAAAAAAAAABkARQnAQ"> |
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This image is missing a text alternative (alt attribute). This is a problem for people using screen readers.

| ----------------- | ----------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- |
| tooltip | 鼠标在 chart 上移动时显示提示信息 | <img src="https://gw.alipayobjects.com/mdn/rms_f5c722/afts/img/A*UMsFRZwIDvMAAAAAAAAAAABkARQnAQ"> |
| legend-active | 鼠标移动到图例选项时,图例项高亮,对应的图形高亮 | <img src="https://gw.alipayobjects.com/mdn/rms_f5c722/afts/img/A*fjkTR70h9YAAAAAAAAAAAABkARQnAQ"> |
| legend-filter | 分类图例的勾选 | <img src="https://gw.alipayobjects.com/mdn/rms_f5c722/afts/img/A*qKwJTbpJLyUAAAAAAAAAAABkARQnAQ"> |
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This image is missing a text alternative (alt attribute). This is a problem for people using screen readers.

| tooltip | 鼠标在 chart 上移动时显示提示信息 | <img src="https://gw.alipayobjects.com/mdn/rms_f5c722/afts/img/A*UMsFRZwIDvMAAAAAAAAAAABkARQnAQ"> |
| legend-active | 鼠标移动到图例选项时,图例项高亮,对应的图形高亮 | <img src="https://gw.alipayobjects.com/mdn/rms_f5c722/afts/img/A*fjkTR70h9YAAAAAAAAAAAABkARQnAQ"> |
| legend-filter | 分类图例的勾选 | <img src="https://gw.alipayobjects.com/mdn/rms_f5c722/afts/img/A*qKwJTbpJLyUAAAAAAAAAAABkARQnAQ"> |
| continuous-filter | 连续图例的过滤 | <img src="https://gw.alipayobjects.com/mdn/rms_f5c722/afts/img/A*pe97RKJM_XAAAAAAAAAAAABkARQnAQ"> |
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This image is missing a text alternative (alt attribute). This is a problem for people using screen readers.

3. jitter:扰动散开,将数据的位置轻微的调整,使得映射后的图形位置不再重叠。仅适用于分类数据,将分类数据转换成索引值,在索引值 [ -0.5 ,0.5 ] 的范围内进行随机分布。
<img alt='jitter' src='https://gw.alipayobjects.com/mdn/rms_f5c722/afts/img/A*c_oTS4jAICkAAAAAAAAAAAAAARQnAQ' width='100%' style='max-width: 900px'/>
4. symmetric:数据对称,使得生成的图形居中对齐,例如河流图、漏斗图。
<img src="https://gw.alipayobjects.com/mdn/rms_f5c722/afts/img/A*igxpSIu_xngAAAAAAAAAAABkARQnAQ" width='100%' style='max-width: 900px'>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This image is missing a text alternative (alt attribute). This is a problem for people using screen readers.

@hustcc
Copy link
Member

hustcc commented Sep 11, 2020

这么大的改动!问几个问题:

  1. 如果这个更新部署之后,原网站文档中的地址和新文档地址,有多少保持一致,多少地址变化掉,变化掉的会有自动跳转嘛?
  2. 新文档地址怎么避免 404?

@BBSQQ
Copy link
Member Author

BBSQQ commented Sep 11, 2020

这么大的改动!问几个问题:

  1. 如果这个更新部署之后,原网站文档中的地址和新文档地址,有多少保持一致,多少地址变化掉,变化掉的会有自动跳转嘛?
  2. 新文档地址怎么避免 404?
  1. 没有自动跳转。之前上的那版定位是为了填补 API 空缺临时上的,再之前下线的那版机器生成的就更没有链接存留了。这个问题记下了,确实需要从官网层面解决。
  2. 这次我人肉检查了404,之后 Gatsby 层会出一个解决方案,自动检查无效链接。上报 404 链接 gatsby-theme-antv#202

docs/api-zh/chart-fun.md Outdated Show resolved Hide resolved
@@ -0,0 +1,424 @@
<!--## geometry方法-->
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

同理,命名上既有 fun 又有 api 的统一成一个词可以嘛

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done 统一为 func

@@ -0,0 +1,90 @@
<!--## chart\[geom\](options) 创建几何标记-->
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

geometry 都用全称吧,包括 coord。g2 v4 后的一些 api 都是改成了全称,比如 coord ---> coordinate.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done


### G2.registerEngine

注册渲染引擎,目前 G2 支持 svg canvas。
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个直接去掉吧,不用让外部开发感知。

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@@ -0,0 +1,29 @@
#### option.top
Copy link
Member

@hustcc hustcc Sep 14, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

文件命名,小写+连接线。

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@hustcc
Copy link
Member

hustcc commented Sep 14, 2020

yarn.lock 文件去掉。

Copy link

@accesslint accesslint bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are accessibility issues in these changes.

3. jitter:扰动散开,将数据的位置轻微的调整,使得映射后的图形位置不再重叠。仅适用于分类数据,将分类数据转换成索引值,在索引值 [ -0.5 ,0.5 ] 的范围内进行随机分布。
<img alt='jitter' src='https://gw.alipayobjects.com/mdn/rms_f5c722/afts/img/A*c_oTS4jAICkAAAAAAAAAAAAAARQnAQ' width='100%' style='max-width: 900px'/>
4. symmetric:数据对称,使得生成的图形居中对齐,例如河流图、漏斗图。
<img src="https://gw.alipayobjects.com/mdn/rms_f5c722/afts/img/A*igxpSIu_xngAAAAAAAAAAABkARQnAQ" width='100%' style='max-width: 900px'>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This image is missing a text alternative (alt attribute). This is a problem for people using screen readers.

Copy link

@accesslint accesslint bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are accessibility issues in these changes.

3. jitter:扰动散开,将数据的位置轻微的调整,使得映射后的图形位置不再重叠。仅适用于分类数据,将分类数据转换成索引值,在索引值 [ -0.5 ,0.5 ] 的范围内进行随机分布。
<img alt='jitter' src='https://gw.alipayobjects.com/mdn/rms_f5c722/afts/img/A*c_oTS4jAICkAAAAAAAAAAAAAARQnAQ' width='100%' style='max-width: 900px'/>
4. symmetric:数据对称,使得生成的图形居中对齐,例如河流图、漏斗图。
<img src="https://gw.alipayobjects.com/mdn/rms_f5c722/afts/img/A*igxpSIu_xngAAAAAAAAAAABkARQnAQ" width='100%' style='max-width: 900px'>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This image is missing a text alternative (alt attribute). This is a problem for people using screen readers.

@BBSQQ
Copy link
Member Author

BBSQQ commented Sep 14, 2020

yarn.lock 文件去掉。

done

@@ -0,0 +1,6 @@
---
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

coordinate 文件名。

@@ -0,0 +1,8 @@
---
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

geometry 拆分成三层是为什么

@@ -0,0 +1,14 @@
_Region_ 结构如下:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里还有一个文件命名问题。

Copy link

@accesslint accesslint bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are accessibility issues in these changes.

3. jitter:扰动散开,将数据的位置轻微的调整,使得映射后的图形位置不再重叠。仅适用于分类数据,将分类数据转换成索引值,在索引值 [ -0.5 ,0.5 ] 的范围内进行随机分布。
<img alt='jitter' src='https://gw.alipayobjects.com/mdn/rms_f5c722/afts/img/A*c_oTS4jAICkAAAAAAAAAAAAAARQnAQ' width='100%' style='max-width: 900px'/>
4. symmetric:数据对称,使得生成的图形居中对齐,例如河流图、漏斗图。
<img src="https://gw.alipayobjects.com/mdn/rms_f5c722/afts/img/A*igxpSIu_xngAAAAAAAAAAABkARQnAQ" width='100%' style='max-width: 900px'>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This image is missing a text alternative (alt attribute). This is a problem for people using screen readers.

Copy link

@accesslint accesslint bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are accessibility issues in these changes.

3. jitter:扰动散开,将数据的位置轻微的调整,使得映射后的图形位置不再重叠。仅适用于分类数据,将分类数据转换成索引值,在索引值 [ -0.5 ,0.5 ] 的范围内进行随机分布。
<img alt='jitter' src='https://gw.alipayobjects.com/mdn/rms_f5c722/afts/img/A*c_oTS4jAICkAAAAAAAAAAAAAARQnAQ' width='100%' style='max-width: 900px'/>
4. symmetric:数据对称,使得生成的图形居中对齐,例如河流图、漏斗图。
<img src="https://gw.alipayobjects.com/mdn/rms_f5c722/afts/img/A*igxpSIu_xngAAAAAAAAAAABkARQnAQ" width='100%' style='max-width: 900px'>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This image is missing a text alternative (alt attribute). This is a problem for people using screen readers.

@hustcc hustcc merged commit e472de5 into master Sep 14, 2020
@hustcc hustcc deleted the api-docs branch September 14, 2020 03:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants