Git Product home page Git Product logo

echarts-doc's Introduction

About

This project is part of the source of The Apache ECharts Official Website. See echarts-website for more details of the building process.

Online Docs

Development

Document content development

Do not need other project.

npm run dev

It will:

  • Start a static server
  • Watch doc site src change and rebuild.
  • Watch doc markdown change and rebuild.

Tips about writing doc

Global variables can be used in doc:

  • galleryViewPath
  • galleryEditorPath
  • websitePath

For example: Embed a example in doc:

~[700x300](${galleryViewPath}doc-example/aria-pie&edit=1&reset=1)

Provide a example link in doc:

[vertically scrollable legend](${galleryEditorPath}pie-legend&edit=1&reset=1)

Provide a website link in doc:

[Apache ECharts website](${websitePath}/en/download.html)

Reference of option

A ~ can be used to refer to a option item in the same doc. For example:

[xAxis.name](~xAxis.name)

If intending to reference an anchor in different doc, it can be:

[itemStyle](option.html#series.itemStyle)

Notes:

  1. Formatter will treat {{use}} as a block. So don't use it inline.
// Good
Some description
{{ use: partial-xxx }}
Some other description
// Bad
Some description about {{ use: partial-inline-xxx }}
  1. Don't use to complex inline {{if}} {{else}} structure. It will make reading and patching between different languages harder.
// Good
{{ if: ${prefix} !== '#' }}
表示同一层级的节点的颜色饱和度 选取范围。
{{ else }}
本系列默认的节点的颜色饱和度 选取范围。
{{ /if }}
数值范围 0 ~ 1

// Bad
{{ if: ${prefix} !== '#' }}表示同一层级的节点的{{ else }}本系列默认的{{ /if }} 颜色饱和度 选取范围。数值范围 0 ~ 1。

// Good
{{ if: ${prefix} !== '#' }}
It indicates the range of saturation (color alpha) for nodes in a level.
{{ else }}
It indicates the range of saturation (color alpha) for nodes  of the series.
{{ /if }}
The range of values is 0 ~ 1.

// Bad
It indicates the range of saturation (color alpha) {{ if: ${prefix} !== '#' }}for nodes in a level {{ else }} of the series{{ /if }}. The range of values is 0 ~ 1.

Format Option Docs

Option docs needs to be formatted before commit.

Run

npm run format

Make sure have a double review on the git diff after formatted.

Sync docs between different languages.

After you finished editing doc of one language. You can use following script to sync it to another language.

# zh to en
node tool/patchLanguage --from=zh --to=en
# en to zh
node tool/patchLanguage --from=en --to=zh

Sync will move the structure. It will make editing of other languages much easier.

Again make sure have a double review on the git diff after syncing.

echarts-doc's People

Contributors

100pah avatar a321zjg avatar alex2wong avatar amoschenyq avatar chrisshen93 avatar clarkkkk avatar clemmakesapps avatar dafrok avatar ddanger avatar deqingli avatar faruksrknt avatar feynmancheng avatar gnijuohz avatar harinyhan avatar howderek avatar itsdanielmatos avatar joyhchen avatar kimuraz avatar ovilia avatar pissang avatar plainheart avatar sbalajime avatar sjcobb avatar softwords avatar susiwen8 avatar unship avatar wdingding avatar wf123537200 avatar xhong0 avatar xiaohp avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.