Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
195c147
feat(funnel): set prop to flaten the exit piece
pe-3 Aug 12, 2022
5367383
feat(funnel): add dynamicHegiht prop
pe-3 Aug 12, 2022
6d224c2
feat(funnel):add exitWidth prop
pe-3 Aug 12, 2022
1359abf
feat(funnel):add transform rate between each data
pe-3 Aug 14, 2022
e671605
feat(funnel): add attr explains
pe-3 Sep 6, 2022
92efefb
feat(funnel): supplt doc
pe-3 Sep 21, 2022
6f9d7ad
feat(funnel): use formatter to set funnel rate label
pe-3 Oct 21, 2022
308121b
feat(funnel): prefect the api of rate label formatter
pe-3 Oct 25, 2022
6cdff61
feat(funnel): del tpl from rate label formatter
pe-3 Oct 28, 2022
84158a0
feat(funnel) add precision to funnl conversion rate
pe-3 Oct 31, 2022
6413d9b
Merge pull request #281 from pe-3/feat-funnel-newProp
pissang Oct 31, 2022
95e17f4
fix(grid): Adapt documentation of containLabel to include axis name. …
robin-gerling Jan 23, 2024
66932af
doc(matrix): add doc for apache/echarts#19807
Ovilia May 16, 2024
34f8b9f
Merge pull request #394 from apache/feat-matrix
Ovilia May 16, 2024
5b6f4ec
doc(scatter): add jitter apache/echarts#19941
Ovilia May 17, 2024
44754dd
doc(scatter): add jitter apache/echarts#19941
Ovilia May 20, 2024
8bf79b2
Merge pull request #380 from robin-gerling/fix-9265
Ovilia Jan 3, 2025
43c203d
Merge pull request #446 from apache/master
Ovilia Jun 6, 2025
e1ee440
doc(matrix): add doc for matrix enhance apache/echarts#21005
Ovilia Jun 9, 2025
56aecf1
tweak(matrix): change the definition of size and levelSize .
100pah Jun 9, 2025
d18744c
Merge pull request #449 from apache/next-funnel
Ovilia Jun 21, 2025
f3ce392
doc(custom: support tooltipDisabled for custom series
Ovilia Jun 23, 2025
f2921e9
Merge branch 'v6' into dev
Ovilia Jun 25, 2025
6995549
doc: changelog for v6.0.0
Ovilia Jun 25, 2025
ec944b6
Merge pull request #453 from apache/v6-changelog
Ovilia Jun 25, 2025
03b9c3e
Merge branch 'dev' into v6-doc
Ovilia Jun 26, 2025
b74816e
update v6.0.0 en changelog
plainheart Jun 26, 2025
366dbb9
doc: add 6.0.0 Chinese doc
Ovilia Jun 27, 2025
0a2fb97
Fix change log and add breaking changes.
100pah Jun 27, 2025
3d8ccb3
doc(funnel): revert the doc change of funnel new style
Ovilia Jun 28, 2025
1ea1004
fix changelog mistake.
100pah Jun 28, 2025
292fb2c
Merge branch 'dev' of github.com:apache/incubator-echarts-doc into dev
100pah Jun 28, 2025
4f0e944
fix changed log typo
100pah Jun 30, 2025
c537952
(matrix): fix matrix doc.
100pah Jun 30, 2025
824ca6e
add since version and revert containLabel doc.
100pah Jun 30, 2025
c504a31
fix changelog typo
100pah Jun 30, 2025
cc4f64d
doc: registerCustomSeries apache/echarts#20226
Ovilia Jul 1, 2025
d1c2beb
doc(marker): add relativeTo
Ovilia Jul 1, 2025
3d71262
doc(custom): support compoundPath in custom series renderItem
Ovilia Jul 1, 2025
8e12e2b
add doc for apache/echarts#18164
sz-p Jul 1, 2025
f4c0567
(matrix): fix and supplement matrix doc.
100pah Jul 2, 2025
2ead7c7
doc(label): fix label rich style does not inherit the plain label style
Ovilia Jul 2, 2025
73c9e61
Merge pull request #450 from apache/v6-doc
Ovilia Jul 2, 2025
c1746a4
doc: add since
Ovilia Jul 2, 2025
f9a3098
fix(uiControl): fix UIControlVector throw error if no dims declared.
100pah Jul 3, 2025
2d81ca1
tweak doc for `richInheritPlainLabel`
plainheart Jul 4, 2025
09904ec
doc(custom): fix doc description
Ovilia Jul 4, 2025
5f3930c
fix(matrix): Change the clamp behavior and desc.
100pah Jul 15, 2025
0b2c927
Supplement the README for doc writing.
100pah Jul 17, 2025
db69b8c
feat(visualMap): add `unboundedRange` doc.
100pah Jul 17, 2025
5d257a9
feat(labelMargin): uniform minMargin and textMargin.
100pah Jul 21, 2025
30e1975
Merge pull request #457 from apache/label-margin
100pah Jul 21, 2025
54d1ef9
add doc for apache/echarts#21117
sz-p Jul 22, 2025
953e419
Merge pull request #458 from sz-p/doc-21117
Ovilia Jul 22, 2025
b110aed
Merge pull request #442 from sz-p/doc-18144
Ovilia Jul 22, 2025
5aa40a3
Merge pull request #454 from apache/doc-custom
Ovilia Jul 22, 2025
3dcaf11
add doc for apache/echarts#20782
sz-p Jul 22, 2025
aa52cca
doc: add doc for rc.1 since beta.1
Ovilia Jul 23, 2025
3e7c727
Merge pull request #438 from sz-p/doc-6691
Ovilia Jul 23, 2025
ed13a0d
infra: update webpack to 5 latest version and --openssl-legacy-provid…
100pah Jul 29, 2025
cbe7794
doc: supplement usage doc of etpl.
100pah Jul 29, 2025
9239a88
doc: supplement the usage doc.
100pah Jul 29, 2025
00135d9
doc: supplement echarts-doc usage doc.
100pah Jul 29, 2025
60bc500
(1) Fix partial-rect-layout (box layout). (2) Add param ${hostName} t…
100pah Jul 29, 2025
348c2b9
common: Support param ${deprecated} in partial-version .
100pah Jul 29, 2025
b06f229
supplement doc and support `config/env.dev-local.js` as a git-non-tra…
100pah Jul 29, 2025
5761eac
Merge pull request #459 from apache/feat-changelog
Ovilia Jul 30, 2025
1a18eeb
doc: fix typo
Ovilia Jul 30, 2025
a99907c
grid: add doc for outerBounds, and clarify some grid doc.
100pah Jul 30, 2025
934128f
Merge pull request #462 from apache/feat-cartesian-layout
100pah Jul 30, 2025
3299834
feat: support local config, not tracked by git.
100pah Jul 30, 2025
e33c51f
Merge pull request #463 from apache/feat-local-config
100pah Jul 30, 2025
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
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,8 @@ slides/webgl
/public/css
/public/zh/documents
/public/en/documents
/public/zh/coding-standard-content.html
/public/en/coding-standard-content.html
/public/*.html


Expand All @@ -188,4 +190,6 @@ slides/webgl
/tool/blocks-zh.json

/zh-src
/en-src
/en-src

/config/env.*-local.js
217 changes: 198 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ This project is part of the source of [The Apache ECharts Official Website](http

## Development

### Document content development
### Document Content Development

Do not need other project.

Expand All @@ -28,43 +28,74 @@ It will:
+ Watch doc site src change and rebuild.
+ Watch doc markdown change and rebuild.

### Local Config

## Tips about writing doc
To customize the links of `echarts-examples` and other configurations, you can create a local config file `echarts-doc/config/env.dev-local.js`, which is not tracked by git, and its top-level properties will be used to override the corresponding properties of `echarts-doc/config/env.dev.js` when `npm run dev`.

#### Global variables can be used in doc:
For example, create a `echarts-doc/config/env.dev-local.js`:
```js
module.exports = {
// These props will override the same props in `echarts-doc/config/env.dev-local.js`
galleryViewPath: 'http://127.0.0.1:3002/en/view.html?local=1&c=',
galleryEditorPath: 'http://127.0.0.1:3002/en/editor.html?local=1&c=',
EMBEDDED_ECHARTS_SCRIPT_URL: 'http://localhost:8001/echarts/echarts/dist/echarts.js',
};
```


## Tips About Writing Doc

### "Since Version"
"Since Version" is necessary in doc.
Marking "since version" indicates when a new feature was introduced.
For example,
```
{{ use: partial-version(version = "6.0.0") }}
```

### Global Variables

These global variables can be used in doc:
+ `${galleryViewPath}`
+ `${galleryEditorPath}`
+ `${websitePath}`

+ galleryViewPath
+ galleryEditorPath
+ websitePath
See samples in "Reference of echarts-examples or other links"

For example:
Embed a example in doc:
### Reference of echarts-examples or Other Links

Embed an example in doc:
```md
~[700X300](${galleryEditorPath}pie-legend&edit=1&reset=1)
~[700x300](${galleryViewPath}doc-example/aria-pie&edit=1&reset=1)
```
Provide a example link in doc:

Provide an example link in doc:
```md
[vertically scrollable legend](${galleryEditorPath}pie-legend&edit=1&reset=1)
[aria pie](${galleryViewPath}doc-example/aria-pie&edit=1&reset=1)
```

Provide a website link in doc:
```md
[Apache ECharts website](${websitePath}/en/download.html)
```

#### Reference of option
### Reference of Other ECharts Option

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

```md
[xAxis.name](~xAxis.name)
```

If intending to reference an anchor in different doc, it can be:
```md
In api.html, reference
[itemStyle](option.html#series.itemStyle)
```

#### Notes:

### Notice

1. Formatter will treat {{use}} as a block. So don't use it **inline**.

Expand All @@ -77,32 +108,180 @@ Some other description
Some description about {{ use: partial-inline-xxx }}
```

2. Don't use to complex **inline** {{if}} {{else}} structure. It will make reading and patching between different languages harder.
2. Don't use complex **inline** {{if}} {{else}} structure. It will make reading and patching between different languages harder.

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

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

// Good
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
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.

```

### Doc Structure

+ Entries:
+ the entry in source code is like `en/api/api.md`, `en/api/option.md`, they will be compiled to webpage like `api.html`, `option.html`

+ Shared targets (text blocks):
+ All of the shared targets should be put into the `partial` folder, such as, `en/api/partial/xxx`, `en/optino/partial/xxx`, and named with a prefix `partial-`.

+ Subtitles:
+ The doc is structured by subtitles.
+ For example:
```
# series.bar(Object)
## propA(number|string) = null
some desc xxx
## propB(number|string) = null
some desc yyy
## propC(string) = ${defaultPropC|default("'auto'")}

#${prefix} someOtherProp(Object)
some desc zzz
```
+ `(xxx|yyy)` is the data type in that subtitle:
+ Can only be `number`, `string`, `boolean`, `Object`, `Array`, `Function`
+ Can be an union, such as `number|string`.
+ `= xxx` is the default value in that subtitle:
+ Can be omitted.
+ Typically be `null`, `undefined`, `true`, `false`, `90` (a literal number), `some literal string`, `[0, 90]` (an literal array).
+ The default value can be specified by a template variable, such as, `= ${someVar}`, `= ${someVar|default(123)}`, `= ${someVar|default("'auto'")}`.
+ The top level subtitles:
+ For example, `# series.bar(Object)`, the dot symbol represents a special meaning: the component main type is `'series'` and the component sub-type is `'bar'`.
+ The variable `${prefix}`
+ It is commonly used in "target: partial-xxx", which serves different subtitle levels. The value of `${prefix}` is like `'#'`, `'##'`, `'###'`, ...
+ Typical usage:
```tpl
When we define a "target"
{{ target: partial-abc-1 }}
#${prefix} propLayout(Object)
All of the subtitles should uses that prefix variable.
##${prefix} x(number)
some desc
##${prefix} y(number)
some desc
{{ /target }}
{{ target: partial-target-2 }}
```
```tpl
When we use that "partial-abc-1"
{{ target: partial-def-2 }}
#${prefix|default('#')} somePropA(Object)
{{ use: partial-abc-1(
prefix: ${prefix} + '#'
) }}
```

### Template Syntax

The template syntax follows [etpl](https://github.com/ecomfe/etpl/blob/master/doc/syntax.md) (but use `{{ }}` rather than `<!-- -->` as the interpolate tags).
> A syntax highlight tool: [etpl-vscode](https://marketplace.visualstudio.com/items?itemName=yibuyisheng.etpl-vscode)

Summary of the commonly used syntax:
```template
--- TEMPLATE VARIABLE ---
Use a variable:
some text ${someVariable} some text
Variable scope:
The scope of any variable is "target" (see below).
Variable filter:
Some predefined filters can be used in the template variable, e.g.,
${someVariable|default("'auto'")} means using the string "'auto'"
as the default if ${someVariable} is '' or null or undefined.
Declaration or assignment of a target-local variable:
{{ var: myVar = 'some' }}
{{ var: myVar = 123 }}
{{ var: myVar = ${someOtherStr} + 'some_str' }}


--- IF ELSE ---
{{ if: ${number1} > 0 }}
some text xxx
{{ elif: ${string1} === 'abc' }}
some text yyy
{{ else }}
some text zzz
{{ /if }}


--- FOR LOOP ---
{{ for: ${persons} as ${person}, ${index} }}
some text ${index}: ${person.name}
{{ /for }}


--- TARGET (DEFINE A TEXT BLOCK) ---
{{ target: a_predefined_block_name_1 }}
The input varA is ${varA}
The input varB is ${varB}
The input varC is ${varC}
Notice:
- The scope of the "target name" is the entire webpage (such as, `option.html`, `api.html`), so name conflicts should be avoided.
- "target" is not shared across webpage (such as, `option.html`, `api.html`).
- The close tag of "target" can be omitted, but not recommended.
{{ /target }}


--- USE (USE A PREDEFINED TEXT BLOCK) ---
{{ use: a_predefined_block_name_1 }}
{{ use: a_predefined_block_name_2(
varA = ${myVarX},
varB = 123,
varC = 'some string',
prefix: ${prefix} + '##'
) }}
Concatenation operator `+` can be used in that string.
```


### Document Embedded Examples

This is the embedded example that can be opened by clicking "try it" and then appears on the right side of the doc page.

Declare the base echarts options (`ExampleBaseOption`), whose scope is each echarts component or series. A `ExampleBaseOption` can be shared by multiple options. e.g.,
```md
<ExampleBaseOption name="cartesian-bar" title="直角坐标系上的柱状图" title-en="Bar on Cartesian">
const option = {
...
}
</ExampleBaseOption>
```

Declare example UI control in each option, who uses the currently opened example. Supported UI controls:
+ `<ExampleUIControlBoolean default="true" />`
+ `<ExampleUIControlNumber default="8" step="0.5" />`
+ `<ExampleUIControlColor default="#d2dbee" />`
+ `<ExampleUIControlEnum options="horizontal,vertical" default="horizontal" />`
+ `<ExampleUIControlIcon default="none" />`
+ `<ExampleUIControlVector default="0,0" />`
+ `<ExampleUIControlAngle min="-90" max="90" step="1" />`
+ `<ExampleUIControlPercent default="0" />`
+ `<ExampleUIControlPercentVector min="0" dims="InnerStart,InnerEnd,OuterStart,OuterEnd" default="0,0,0,0" />`
+ `<ExampleUIControlText />`

The detailed API and implementation of the UI controls can be checked in `echarts-doc/src/controls/*.vue` and `echarts-doc/src/components/OptionControl.vue`.

Note: currently `ExampleBaseOption` and `ExampleUIControlXxx` will be copied (by `echarts-doc/build.js`) from `echarts-doc/zh/**/*.md` to `echarts-doc/en/**/*.md` if they are not declared in `echarts-doc/en/**/*.md`.


## Format Option Docs

Option docs needs to be formatted before commit.
Expand All @@ -114,7 +293,7 @@ npm run format

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

## Sync docs between different languages.
## Sync Docs Between Different Languages

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

Expand Down
Loading