Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 8 additions & 0 deletions en/option/component/axis-common.md
Original file line number Diff line number Diff line change
Expand Up @@ -651,6 +651,14 @@ The maximum length for the truncated text. Any text exceeding this length will b

The content displayed at the end of the text after truncation.

{{ if: ${componentType} === 'xAxis' || ${componentType} === 'yAxis' }}
#${prefix} nameMoveOverlap(boolean) = true

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

Whether to move axis name to avoid overlap with axis labels.
{{ /if }}

#${prefix} inverse(boolean) = false

<ExampleUIControlBoolean />
Expand Down
35 changes: 9 additions & 26 deletions en/option/component/geo-common.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@

{{ if: ${inMap} }}
{{ var: componentNameInLink = 'series-map' }}
{{ var: componentMainType = 'series' }}
{{ var: componentSubType = 'map' }}
{{ else }}
{{ var: componentNameInLink = 'geo' }}
{{ var: componentMainType = 'geo' }}
{{ var: componentSubType = null }}
{{ /if }}

#${prefix} map(string) = ''
Expand Down Expand Up @@ -81,9 +85,6 @@ See also [Flight Seatmap](${galleryEditorPath}geo-seatmap-flight).

The demo above shows that SVG format can be used in ECharts. See more info in [SVG Base Map](tutorial.html#SVG%20Base%20Map%20in%20Geo%20Coords%20and%20Map%20Series).

#${prefix} roam(boolean|string) = false

{{ use: partial-roam() }}

#${prefix} projection(Object)

Expand Down Expand Up @@ -160,22 +161,13 @@ series: {

Note: `stream` is not required in the `projection`.

#${prefix} center(Array)

Center of current view-port, in longitude and latitude by default. Use the projected coordinates if `projection` is set.
{{ use: partial-view-coord-sys-common(
prefix = ${prefix},
componentMainType = ${componentMainType},
componentSubType = ${componentSubType}
) }}

Example:

```ts
center: [115.97, 29.71]
```

```ts
projection: {
projection: (pt) => project(pt)
},
center: project([115.97, 29.71])
```

#${prefix} aspectScale(number) = 0.75

Expand Down Expand Up @@ -203,15 +195,6 @@ boundingCoords: [
],
```

#${prefix} zoom(number) = 1

Zoom rate of current view-port.

#${prefix} scaleLimit(Object)

{{ use: partial-scale-limit(
prefix = "#" + ${prefix}
) }}

#${prefix} nameMap(Object)

Expand Down
15 changes: 14 additions & 1 deletion en/option/component/visual-map.md
Original file line number Diff line number Diff line change
Expand Up @@ -305,11 +305,24 @@ Each column of the above array is regarded as a `dimension`. For example, when p

Use the last dimension of `data` by default.

## seriesIndex(number|Array)
## seriesIndex(number|string|Array)

Specify visual mapping should be performed on which series, from which
[series.data](~series.data) is fetched.

Options:
- A index number
- An array of index numbers
- `'all'`/`null`/`undefined` (default): means all of the series.

## seriesId(number|string|Array)

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

Specify visual mapping should be performed on which series, from which
[series.data](~series.data) is fetched.

Can be a id or a list of ids.
All series are used by default.

## hoverLink(boolean) = true
Expand Down
4 changes: 2 additions & 2 deletions en/option/option.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,6 @@ Global font style.
defaultFontSize: 12
) }}

{{import: partial-rich-inherit-plain-label}}

{{import: partial-animation }}

# stateAnimation(Object)
Expand Down Expand Up @@ -166,6 +164,8 @@ Notice: the setting only affects "display time", not "parse time".
For how time value (like `1491339540396`, `'2013-01-04'`, ...) is parsed in echarts, see [the time part in date](~series-line.data).


{{import: partial-rich-inherit-plain-label}}

# options(Array)

Option array used in [timeline](option.html#timeline). Each item of this array is an echarts option (`ECUnitOption`).
Expand Down
16 changes: 16 additions & 0 deletions en/option/partial/coord-sys.md
Original file line number Diff line number Diff line change
Expand Up @@ -265,13 +265,29 @@ The id of the [singleAxis coordinate system](~singleAxis) to base on. When mutip

The index of the [geographic coordinate system](~geo) to base on. When mutiple `geographic` exist within an ECharts instance, use this to specify the corresponding `geographic`.

{{ if: ${seriesType} === 'map' }}
When `geoIndex` and `geoId` is not specified, map series creates an exclusive `geo` component for itself. `geoIndex` or `geoId` can be used to specify an outer [geo component](~geo), which can be shared with other series like [pie](~series-pie). Moreover, the region color of the outer [geo component](~geo) can be controlled by the map series (via [visualMap](~visualMap)).

When `geoIndex` or `geoId` is specified, [series-map.map](~series-map.map) other style configurations like [series-map.itemStyle](~series-map.itemStyle) will not work, but corresponding configurations in [geo component](~geo) will be used.
{{ /if }}

**See example**: [geo-choropleth-scatter](${galleryEditorPath}geo-choropleth-scatter&reset=1&edit=1)

## geoId(number) = undefined

{{ if: ${version} }}
{{ use: partial-version(version = ${version}) }}
{{ /if }}

The id of the [geographic coordinate system](~geo) to base on. When mutiple `geographic` exist within an ECharts instance, use this to specify the corresponding `geographic`.

{{ if: ${seriesType} === 'map' }}
When `geoIndex` and `geoId` is not specified, map series creates an exclusive `geo` component for itself. `geoIndex` or `geoId` can be used to specify an outer [geo component](~geo), which can be shared with other series like [pie](~series-pie). Moreover, the region color of the outer [geo component](~geo) can be controlled by the map series (via [visualMap](~visualMap)).

When `geoIndex` or `geoId` specified, [series-map.map](~series-map.map) other style configurations like [series-map.itemStyle](~series-map.itemStyle) will not work, but corresponding configurations in [geo component](~geo) will be used.
{{ /if }}

**See example**: [geo-choropleth-scatter](${galleryEditorPath}geo-choropleth-scatter&reset=1&edit=1)
{{ /if }}

{{ if: ${parallel} }}
Expand Down
22 changes: 21 additions & 1 deletion en/option/partial/rich-inherit-plain-label.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,24 @@

Whether rich text inherits plain text style.

Since v6, the rich text styles (`fontStyle`, `fontWeight`, `fontSize`, `fontFamily`, `textShadowColor`, `textShadowBlur`, `textShadowOffsetX`, `textShadowOffsetY`) inherit the plain text style. To disable this behavior, you can set `richInheritPlainLabel: false` at the root level of an echarts option or the same level of the label style options. See also [#20977](https://github.com/apache/echarts/pull/20977).
This option is just for backward compatibility.

> The [label.rich / textStyle.rich](~series-scatter.label.rich) `fontStyle`, `fontWeight`, `fontSize`, `fontFamily`, `textShadowColor`, `textShadowBlur`, `textShadowOffsetX`, `textShadowOffsetY` are changed to inherit the corresponding [plain label styles](~series-scatter.label) since echarts v6. You can use `richInheritPlainLabel: false` to restore it. For example,
> ```js
> option = {
> richInheritPlainLabel: false, // In most cases, this is enough.
> xxx1: {
> // Can also set it here to only control this label.
> label: {
> richInheritPlainLabel: false,
> rich: {/* ... */},
> }
> },
> xxx2: {
> textStyle: {
> richInheritPlainLabel: false,
> rich: {/* ... */},
> }
> }
> }
> ```
78 changes: 78 additions & 0 deletions en/option/partial/view-coord-sys.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
{{ target: partial-view-coord-sys-common }}

{{ if: ${componentMainType} && ${componentSubType} }}
{{ var: componentNameInLink = ${componentMainType} + '-' + ${componentSubType} }}
{{ else }}
{{ var: componentNameInLink = ${componentMainType} }}
{{ /if }}

{{ if: ${componentNameInLink} === 'geo'
|| ${componentNameInLink} === 'series-map'
}}
{{ var: isGeoOrMap = true }}
{{ var: sourceName = "source map" }}
{{ else }}
{{ var: sourceName = "graphic elements" }}
{{ /if }}


#${prefix} center(Array)

{{ if: ${componentNameInLink} === 'series-graph' || ${componentNameInLink} === 'series-sankey' }}
<ExampleUIControlVector default="0,0" dims="x,y" />
{{ /if }}

`center` specifies which point on the ${sourceName} should be placed at the center of the viewport (i.e., typically, the center of the canvas).

{{ if: ${isGeoOrMap} }}
It is in longitude and latitude by default. Use the projected coordinates if [proejction](~${componentNameInLink}.projection) is set.

Example:

```ts
// Place this [lng, lat] at the center of the viewport (canvas).
center: [115.97, 29.71]
```

```ts
projection: {
projection: (pt) => project(pt)
},
center: project([115.97, 29.71])
```
{{ /if }}

Center can also be a percentage string, like `'30%'`, based on the ${sourceName} bounding rect width/height {{ if: ${isGeoOrMap} }}(by min/max latitude/longitude, or min/max projected coordinates if [proejction](~${componentNameInLink}.projection) is set){{ /if }}. You can use `'0%'` to place the top or left of ${sourceName} to the center of the viewport (canvas), or use `'100%'` to place the right or bottom to the center of the viewport (canvas).
For example:
```ts
center: [115.97, '30%']
// Place the top of ${sourceName} to the center of the viewport (canvas)
center: [115.97, '0%']
// Place the left of ${sourceName} to the center of the viewport (canvas)
center: ['0%', 13]
// Place the bottom of ${sourceName} to the center of the viewport (canvas)
center: [115.97, '100%']
// Place the right of ${sourceName} to the center of the viewport (canvas)
center: ['100%', 13]
```

> The percentage string is introduced since `v5.3.3`. It is initially based on canvas width/height. But that is not reasonable, and then changed to be based on the bounding rect since `v6.0.0`.


#${prefix} zoom(number) = 1

{{ if: ${componentNameInLink} === 'series-graph' || ${componentNameInLink} === 'series-sankey' }}
<ExampleUIControlNumber default="1" min="0" step="0.1" />
{{ /if }}

Zoom rate of current viewport.

#${prefix} scaleLimit(Object)

{{ use: partial-scale-limit(
prefix = "#" + ${prefix}
) }}

#${prefix} roam(boolean|string) = false

{{ use: partial-roam() }}
30 changes: 5 additions & 25 deletions en/option/series/graph.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,24 +33,6 @@ Graph is a diagram to represent [nodes](~series-graph.nodes) and the [links](~se
matrix = true,
) }}

## center(Array)

<ExampleUIControlVector default="0,0" dims="x,y" />

Center of current view-port. It can be an array containing two `number`s in pixels or `string`s in percentage relative to the container width/height.
`string` is supported from version `5.3.3`.

Example:
```ts
center: [115.97, '30%']
```

## zoom(number) = 1

<ExampleUIControlNumber default="1" min="0" step="0.1" />

Zoom rate of current view-port.

## layout(string) = 'none'

<ExampleUIControlEnum options="none,force,circular" />
Expand Down Expand Up @@ -128,16 +110,14 @@ It will slow down the nodes' movement. The value range is from 0 to 1.

But it is still an experimental option, see [#11024](https://github.com/apache/echarts/issues/11024).

## roam(boolean|string) = false

{{ use: partial-roam() }}

## scaleLimit(Object)

{{ use: partial-scale-limit(
prefix = "##"
{{ use: partial-view-coord-sys-common(
prefix = '#',
componentMainType = 'series',
componentSubType = 'graph'
) }}


## nodeScaleRatio(number) = 0.6

<ExampleUIControlNumber min="0" max="1" step="0.01" default="0.6" />
Expand Down
19 changes: 0 additions & 19 deletions en/option/series/map.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,25 +31,6 @@ Series of same [map type](~series-map.map) will show in one map. At this point,
geo = true
) }}

## center(Array)

Center of current view-port. It can be an array containing two `number`s in pixels or `string`s in percentage relative to the container width/height.
`string` is supported from version `5.3.3`.

Example:
```ts
center: [115.97, '30%']
```

## geoIndex(number) = null

In default case, map series create exclusive `geo` component for themselves. But `geoIndex` can be used to specify an outer [geo component](~geo), which can be shared with other series like [pie](~series-pie). Moreover, the region color of the outer [geo component](~geo) can be controlled by the map series (via [visualMap](~visualMap)).

When `geoIndex` specified, [series-map.map](~series-map.map) other style configurations like [series-map.itemStyle](~series-map.itemStyle) will not work, but corresponding configurations in [geo component](~geo) will be used.

For example:
~[600x400](${galleryViewPath}geo-map-scatter&reset=1&edit=1)

## mapValueCalculation(string) = 'sum'

Value of multiple series with the same [map type](~series-map.map) can use this option to get a statistical value.
Expand Down
8 changes: 8 additions & 0 deletions en/option/series/sankey.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,14 @@ The layout direction of the nodes in the Sankey diagram, which can be horizontal

The drag-and-drop interaction of the node, which is enabled by default. After opening, the user can drag any node in the Sankey diagram to any position. To turn this interaction off, simply set the value to `false`.


{{ use: partial-view-coord-sys-common(
prefix = '#',
componentMainType = 'series',
componentSubType = 'sankey'
) }}


## edgeLabel(Object)

{{ use: sankey-edge-label(
Expand Down
20 changes: 5 additions & 15 deletions en/option/series/tree.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,19 +44,13 @@ The tree diagram is mainly used to visualize the tree data structure, which is a
none = true
) }}

## center(Array)

Center of current view-port. It can be an array containing two `number`s in pixels or `string`s in percentage relative to the container width/height.
`string` is supported from version `5.3.3`.

Example:
```ts
center: [115.97, '30%']
```

## zoom(number) = 1
{{ use: partial-view-coord-sys-common(
prefix = '#',
componentMainType = 'series',
componentSubType = 'tree'
) }}

Zoom rate of current view-port.

## layout(string) = 'orthogonal'

Expand Down Expand Up @@ -108,10 +102,6 @@ This is the position where the polyline branches in the subtree when the shape o

** Note: This configuration item is only valid when `edgeShape = 'polyline'`. **

## roam(boolean|string) = false

{{ use: partial-roam() }}

## expandAndCollapse(boolean) = true

<ExampleUIControlBoolean default="true" />
Expand Down
Loading