Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
61b590e
doc: improve stackOrder documentation with usage notes
Justin-ZS Jul 24, 2025
9d0a373
fix(echarts-instance): Fix "opional" typo.
ducktordanny Aug 2, 2025
393ba3a
Enhance coord sys doc.
100pah Aug 9, 2025
4c36a0b
Supplement coord sys related API doc, custom series doc, media query …
100pah Aug 10, 2025
fa0989b
Add thumbnail component doc.
100pah Aug 10, 2025
375474b
Merge pull request #470 from apache/coord-sys-doc-enhancement
100pah Aug 10, 2025
4f76ebb
Merge pull request #465 from ducktordanny/fix/echarts-instance-opiona…
Ovilia Aug 19, 2025
18b1950
fix: jitter should only be under xAxis and yAxis
Ovilia Aug 19, 2025
be700aa
doc: add doc for break axis apache/echarts#19459
Ovilia Aug 19, 2025
4bcad1c
feat: improve blockquote style
Ovilia Aug 19, 2025
ff97cae
Merge pull request #474 from apache/feat-break
Ovilia Aug 20, 2025
98f7097
add version tip for axis break
plainheart Aug 20, 2025
a39368b
add version tip for API
plainheart Aug 20, 2025
8f56acf
doc style: quote less noticeable and code block in quote more disting…
100pah Aug 21, 2025
41c2725
style: tweak since version.
100pah Aug 21, 2025
4f2184a
Add global variables for link in code block.
100pah Aug 21, 2025
b0923ea
tweak version.
100pah Aug 21, 2025
4cf9db5
enhance axis break doc: (1) action and event (2) formatter param (3) …
100pah Aug 21, 2025
673340e
Merge branch 'master' of github.com:apache/incubator-echarts-doc
100pah Aug 21, 2025
df13f10
enhance: useUTC
100pah Aug 21, 2025
11332b7
Merge pull request #475 from apache/axis-break-enhance
Ovilia Aug 22, 2025
7df6fac
update some link to handbook after migrating.
100pah Aug 23, 2025
846b557
Merge pull request #460 from Justin-ZS/fix/stackOrder-doc-improvement
Ovilia Sep 9, 2025
05bb8ae
add doc for tooltip `displayTransition` option (apache/echarts#20966)
plainheart Sep 13, 2025
21ad8fd
fix(build): replace the `${lang}` var in all config items when md2jso…
plainheart Sep 28, 2025
43ce692
fix: fix the setTheme doc to add a caveat.
100pah Sep 28, 2025
40838ac
doc(line): fix axisTick lineStyle color defaultValue
Sep 30, 2025
c0c6919
Merge pull request #478 from qinhuangdaoooo/fix-docs
plainheart Sep 30, 2025
9692cd5
doc(axis): fix typo in axis.max description
xmatthias Oct 2, 2025
7de8ed4
Merge pull request #479 from xmatthias/fix/xaxis-max
plainheart Oct 5, 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
52 changes: 34 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,42 +60,58 @@ For example,
### Global Variables

These global variables can be used in doc:
+ `${galleryViewPath}`
+ `${galleryEditorPath}`
+ `${websitePath}`
+ `${galleryViewPath}`: Use it like `${galleryViewPath}pie-legend`.
+ `${galleryEditorPath}`: Use it like `${galleryEditorPath}pie-legend`.
+ `${optionDocPath}`: Use it like `${optionDocPath}#xAxis.type`.
+ `${apiDocPath}`: Use it like `${apiDocPath}#echarts.init`.
+ `${handbookPath}`: Use it like `${handbookPath}basics/import`.
+ `${websitePath}`: Use it like `${websitePath}/examples/en/index.html#chart-type-custom`.

See samples in "Reference of echarts-examples or other links"

### Reference of echarts-examples or Other Links
### Reference of Other ECharts Option

Embed an example in doc:
A `~` can be used to refer to a option item in the same doc. For example:
```md
~[700X300](${galleryEditorPath}pie-legend&edit=1&reset=1)
~[700x300](${galleryViewPath}doc-example/aria-pie&edit=1&reset=1)
[xAxis.name](~xAxis.name)
```

Provide an example link in doc:
To reference an anchor in different doc, it can be:
```md
[vertically scrollable legend](${galleryEditorPath}pie-legend&edit=1&reset=1)
[aria pie](${galleryViewPath}doc-example/aria-pie&edit=1&reset=1)
[itemStyle](option.html#series.itemStyle)
[action.highlight](api.html#action.highlight)
[Custom Series](tutorial.html#Custom%20Series)
[Use ECharts with bundler and NPM](${handbookPath}basics/import)
```

Provide a website link in doc:
To add references in a code block, we have to:
```md
[Apache ECharts website](${websitePath}/en/download.html)
// See doc: ${optionDocPath}#series-bar.select
// See doc: ${apiDocPath}#echarts.init
```

### Reference of Other ECharts Option
### Reference of echarts-examples or Other Links

A `~` can be used to refer to a option item in the same doc. For example:
Embed an example in doc (display the example directly in doc with an iframe. To avoid performance issues, do not overuse it.):
```md
[xAxis.name](~xAxis.name)
~[700X300](${galleryViewPath}pie-legend&edit=1&reset=1)
~[700x300](${galleryViewPath}doc-example/aria-pie&edit=1&reset=1)
```

If intending to reference an anchor in different doc, it can be:
Insert an image:
```md
In api.html, reference
[itemStyle](option.html#series.itemStyle)
[600xauto](~axis-align-with-label.png)
```

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

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


Expand Down
21 changes: 14 additions & 7 deletions build/build-doc.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const chalk = require('chalk');
const argv = require('yargs').argv;
const path = require('path');
const chokidar = require('chokidar');
const {debounce} = require('lodash');
const {debounce, cloneDeep} = require('lodash');
const {getDocJSONPVarNname} = require('../src/shared');
const {readConfigEnvFile} = require('./helper');

Expand Down Expand Up @@ -63,17 +63,24 @@ for (let key in config) {
}

async function md2jsonAsync(opt) {

var newOpt = Object.assign({
path: path.join(opt.language, opt.entry, '**/*.md'),
tplEnv: Object.assign({}, config, {
galleryViewPath: config.galleryViewPath.replace('${lang}', opt.language),
galleryEditorPath: config.galleryEditorPath.replace('${lang}', opt.language),
handbookPath: config.handbookPath.replace('${lang}', opt.language)
}),
tplEnv: replaceLangInConfig(cloneDeep(config)),
imageRoot: config.imagePath
}, opt);

function replaceLangInConfig(config) {
for (const [prop, value] of Object.entries(config)) {
if (typeof value === 'object' && value) {
replaceLangInConfig(value)
}
else if (typeof value === 'string') {
config[prop] = value.replace('${lang}', opt.language)
}
}
return config;
}

function run(cb) {
md2json(newOpt).then(schema => {
writeSingleSchema(schema, opt.language, opt.entry, false);
Expand Down
2 changes: 2 additions & 0 deletions config/env.asf.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ const path = require('path');
module.exports = {
galleryViewPath: 'https://echarts.apache.org/examples/${lang}/view.html?c=',
galleryEditorPath: 'https://echarts.apache.org/examples/${lang}/editor.html?c=',
optionDocPath: 'https://echarts.apache.org/${lang}/option.html',
apiDocPath: 'https://echarts.apache.org/${lang}/api.html',
handbookPath: 'https://echarts.apache.org/handbook/${lang}/',
websitePath: 'https://echarts.apache.org',

Expand Down
2 changes: 2 additions & 0 deletions config/env.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ const path = require('path');
module.exports = {
galleryViewPath: 'http://localhost/echarts-website/examples/${lang}/view.html?c=',
galleryEditorPath: 'http://localhost/echarts-website/examples/${lang}/editor.html?c=',
optionDocPath: 'https://echarts.apache.org/${lang}/option.html',
apiDocPath: 'https://echarts.apache.org/${lang}/api.html',
handbookPath: 'http://localhost/echarts-website/handbook/${lang}/',
websitePath: 'http://localhost/echarts-website',

Expand Down
2 changes: 2 additions & 0 deletions config/env.localsite.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ const path = require('path');
module.exports = {
galleryViewPath: 'http://localhost/echarts-website/examples/${lang}/view.html?c=',
galleryEditorPath: 'http://localhost/echarts-website/examples/${lang}/editor.html?c=',
optionDocPath: 'https://echarts.apache.org/${lang}/option.html',
apiDocPath: 'https://echarts.apache.org/${lang}/api.html',
handbookPath: 'http://localhost/echarts-website/handbook/${lang}/',
websitePath: './',

Expand Down
64 changes: 64 additions & 0 deletions en/api/action.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,37 @@
name?: string,{{/target}}


{{ target: action-axis-break-expand-collapse-common }}
Can not be used to create a new axis break.
```ts
dispatchAction({
type: '${actionType}',

// The target axis components can be queried by either index, id, or name.
xAxisIndex?: 'all' | number;
xAxisId?: string | number;
xAxisName?: string;
yAxisIndex?: 'all' | number;
yAxisId?: string | number;
yAxisName?: string;
singleAxisIndex?: 'all' | number;
singleAxisId?: string | number;
singleAxisName?: number;

breaks: {
// Use the start/end to identify the target break items.
// See more details in doc: ${optionDocPath}#xAxis.breaks.start
start: string | number | Date,
end: string | number | Date,
}
})
```

Then event [axisbreakchanged](~events.axisbreakchanged) is triggered.

See also [axis break isExpanded](option.html#xAxis.breaks.isExpanded).
{{/target}}


{{ target: action }}
# action
Expand Down Expand Up @@ -127,6 +158,39 @@ dispatchAction({
})
```


## axis

### expandAxisBreak

{{ use: partial-version(version = "6.0.0") }}

Expand one or multiple existing axis break items.

{{ use: action-axis-break-expand-collapse-common(
actionType = "expandAxisBreak"
) }}

### collapseAxisBreak

{{ use: partial-version(version = "6.0.0") }}

Collapse one or multiple existing axis break items.

{{ use: action-axis-break-expand-collapse-common(
actionType = "collapseAxisBreak"
) }}

### toggleAxisBreak

{{ use: partial-version(version = "6.0.0") }}

Toggle (expand/collapse) one or multiple existing axis break items.

{{ use: action-axis-break-expand-collapse-common(
actionType = "toggleAxisBreak"
) }}

## legend

Actions related to [legend component](option.html#legend), [legend component](option.html#legend) should be imported before use.
Expand Down
Loading