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

WIP: 文档中的一些建议 #99

Closed
simaQ opened this issue Oct 11, 2019 · 5 comments
Closed

WIP: 文档中的一些建议 #99

simaQ opened this issue Oct 11, 2019 · 5 comments

Comments

@simaQ
Copy link

simaQ commented Oct 11, 2019

内容上

  1. 事件名建议全部采用小写,同 DOM 事件命名风格保持一致(这属于 API 方面的建议)
  2. 对于属性支持回调函数的使用描述过于简单,应该给出具体的 API,包括入参以及返回结果等,最好也有 demo。另外类似描述对象类型中包含的各个属性,使用表格或者代码的方式会不会比现在的列表方式更好?
    image
  3. 在每一篇图表的使用文档中,是否应该都配备适当的 demo?

格式上

  1. 中文文案排版指南,详见 PR,中英文之间加个空格呀~~~注意中英文标点符号
  2. 代码片段需要注明使用的编程语言,便于代码高亮显示
  3. 文档中的代码也需要注意 code style,看有的数据实例直接就这样写了..
    image

未完待续...

@elaine1234
Copy link
Contributor

参数可以用表格形式列出来

option 数据类型 默认值 描述
visible( 这玩意真不改么啊喂 ) boolean true 是否可见
position boolean | string 'top' 位置

@paleface001
Copy link
Contributor

paleface001 commented Oct 31, 2019

visible( 这玩意真不改么啊喂 )

考虑到chartCube的配置面板,这玩意儿还真不能改啊喂

@paleface001
Copy link
Contributor

os: HighCharts两种都支持

@elaine1234
Copy link
Contributor

事件反而建议不要全小写。否则 onlabelmousemove 这玩意还能看吗。。
我觉得就是现在这样的标准驼峰看得清楚,可读性可维护性都好: onLabelMouseMove

@hustcc
Copy link
Member

hustcc commented Nov 1, 2019

事件名称就不要 on 开头了吧。如果是参考 w3c 的命名规范,还确实都是小写。

但是 labelmousemove 也确实有点长了,是否可以参考 g2 那样的命名 label:mousemove。name+基础事件名称

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants