Skip to content

Commit

Permalink
Merge pull request #269 from apache/master
Browse files Browse the repository at this point in the history
chore: merge master to dev
  • Loading branch information
Ovilia authored Jul 12, 2022
2 parents 039a511 + d9f99de commit 5aa5e5c
Show file tree
Hide file tree
Showing 14 changed files with 62 additions and 40 deletions.
4 changes: 2 additions & 2 deletions en/option/component/graphic.md
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ Elements with different types have different shape setting repectively. For exam
{
type: 'image',
style: {
image: 'http://xxx.xxx.xxx/a.png',
image: 'http://example.website/a.png',
x: 100,
y: 200,
width: 230,
Expand Down Expand Up @@ -263,7 +263,7 @@ For example:
left: 'center', // Position at the center horizontally.
bottom: '10%', // Position beyond the bottom boundary 10%.
style: {
image: 'http://xxx.xxx.xxx/a.png',
image: 'http://example.website/a.png',
width: 45,
height: 45
}
Expand Down
2 changes: 1 addition & 1 deletion en/option/component/legend.md
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ ${name} item style. If its children have values as `'inherit'`, the values are i
defaultColor = 'inherit',
defaultBorderColor = 'inherit',
defaultBorderWidth = 'auto',
defaultBorderWidthDesc = 'When its value is `"auto"`, if there is `borderWidth` in series, then it is set to be 2, otherwise, it is set to be 0. If its value is `"inehrit"`, then the `borderWidth` of the series are always used',
defaultBorderWidthDesc = 'When its value is `"auto"`, if there is `borderWidth` in series, then it is set to be 2, otherwise, it is set to be 0. If its value is `"inherit"`, then the `borderWidth` of the series are always used',
defaultType = 'inherit',
defaultOpacity = 'inherit',
defaultShadowBlur = 0,
Expand Down
2 changes: 1 addition & 1 deletion en/option/partial/axisPointer-common.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ Whether to trigger tooltip.

#${prefix} value(number) = null

current value. When using [axisPointer.handle](xAxisPointer.handle), `value` can be set to define the initail position of axisPointer.
current value. When using [axisPointer.handle](xAxisPointer.handle), `value` can be set to define the initial position of axisPointer.

#${prefix} status(boolean)

Expand Down
2 changes: 1 addition & 1 deletion en/option/partial/icon.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ It can be set to an image with `'image://url'` , in which URL is the link to an
An image URL example:

```
'image://http://xxx.xxx.xxx/a/b.png'
'image://http://example.website/a/b.png'
```

A `dataURI` example:
Expand Down
2 changes: 1 addition & 1 deletion en/option/series/pictorialBar.md
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,7 @@ Image can be used as the pattern of graphic elements.
var textureImg = new Image();
textureImg.src = 'data:image/jpeg;base64,...'; // dataURI
// Or
// textureImg.src = 'http://xxx.xxx.xxx/xx.png'; // URL
// textureImg.src = 'http://example.website/xx.png'; // URL
...
itemStyle: {
color: {
Expand Down
6 changes: 6 additions & 0 deletions en/option/series/pie.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,12 @@ Whether to enable the strategy to avoid labels overlap. Defaults to be enabled,

Whether to show sector when all data are zero.

## percentPrecision(number) = 2

<ExampleUIControlNumber min="0" default="2" />

The precision of the percentage value. The default value is `2`.

{{ use: partial-cursor() }}

{{ use: partial-rect-layout-width-height(
Expand Down
44 changes: 25 additions & 19 deletions en/option/series/sunburst.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ The following example shows different `rotate` settings:

Same to [label.rotate](~sunburst.label.rotate)
{{ else }}
[label.rotate](~sunburst.label.rotate)
Same to [label.rotate](~sunburst.label.rotate)
{{ /if }}

#${prefix} align(string) = 'center'
Expand Down Expand Up @@ -54,11 +54,13 @@ If angle of data piece is smaller than this value (in degrees), then text is not

#${prefix} label(Object)

`label` 描述了每个扇形块中,文本标签的样式。
To specify the style of the label of the sector.

**优先级[series.data.label](~series-sunburst.data.label) > [series.levels.label](~series-sunburst.levels.label) > [series.label](~series-sunburst.label)**
**Priority[series.data.label](~series-sunburst.data.label) > [series.levels.label](~series-sunburst.levels.label) > [series.label](~series-sunburst.label)**

{{ use: partial-label-desc() }}
{{ use: partial-label-desc(
name = 'sunburst chart'
) }}

{{ use: partial-sunburst-label-helper(
prefix = ${prefix} + '#'
Expand All @@ -82,11 +84,11 @@ If angle of data piece is smaller than this value (in degrees), then text is not

#${prefix} itemStyle(Object)

旭日图扇形块的样式。
To specify the style of the sector of the sunburst chart.

可以在 [series.itemStyle](~series-sunburst.itemStyle) 定义所有扇形块的样式,也可以在 [series.levels.itemStyle](~series-sunburst.levels.itemStyle) 定义每一层扇形块的样式,还可以在 [series.data.itemStyle](~series-sunburst.data.itemStyle) 定义每个扇形块单独的样式,这三者的优先级从低到高。也就是说,如果定义了 [series.data.itemStyle](~series-sunburst.data.itemStyle),将会覆盖 [series.itemStyle](~series-sunburst.itemStyle) [series.levels.itemStyle](~series-sunburst.levels.itemStyle)
You can specify the style of all sectors with [series.itemStyle](~series-sunburst.itemStyle), or specify the style of each level of sectors with [series.levels.itemStyle](~series-sunburst.levels.itemStyle), or specify a specific style for each sector with [series.data.itemStyle](~series-sunburst.data.itemStyle). The priority is from low to high, that is, if [series.data.itemStyle](~series-sunburst.data.itemStyle) is defined, it will override [series.itemStyle](~series-sunburst.itemStyle) and [series.levels.itemStyle](~series-sunburst.levels.itemStyle).

**优先级[series.data.itemStyle](~series-sunburst.data.itemStyle) > [series.levels.itemStyle](~series-sunburst.levels.itemStyle) > [series.itemStyle](~series-sunburst.itemStyle)**
**Priority[series.data.itemStyle](~series-sunburst.data.itemStyle) > [series.levels.itemStyle](~series-sunburst.levels.itemStyle) > [series.itemStyle](~series-sunburst.itemStyle)**

{{ use: partial-item-style(
prefix = ${prefix} + '#',
Expand Down Expand Up @@ -127,17 +129,17 @@ If angle of data piece is smaller than this value (in degrees), then text is not

# series.sunburst(Object)

[Sunburst Chart](https://en.wikipedia.org/wiki/Pie_chart#Ring_chart_/_Sunburst_chart_/_Multilevel_pie_chart) is composed of multiple pie charts. From the view of data structure, inner rings are the parent nodes of outer rings. Therefore, it can show the partial-overall relationship as [Pie](~series-pie) charts, and also level relation as [Treemap](~series-treemap) charts.
[Sunburst Chart](https://en.wikipedia.org/wiki/Pie_chart#Ring_chart,_sunburst_chart,_and_multilevel_pie_chart) is composed of multiple pie charts. From the view of data structure, inner rings are the parent nodes of outer rings. Therefore, it can show the partial-overall relationship as [Pie](~series-pie) charts, and also level relation as [Treemap](~series-treemap) charts.

**For example:**

~[700x500](${galleryViewPath}sunburst-monochrome&edit=1&reset=1)

~[700x700](${galleryViewPath}sunburst-drink&edit=1&reset=1)

**Data mining**
**Data Drilling**

Sunburst charts support data mining by default. That means, when a user clicks a sector, it will be used as root node, and there will be a circle in the center for return to parent node. If data mining is not needed, it can be disabled by [series-sunburst.nodeClick](~series-treemap.nodeClick).
The sunburst chart supports data drilling by default, which means when a user clicks a sector, it will be used as the root node, and there will be a circle in the center used to return to the parent node. If data drilling is not needed, it can be disabled by [series-sunburst.nodeClick](~series-sunburst.nodeClick).

## type(string) = 'sunburst'

Expand Down Expand Up @@ -203,7 +205,7 @@ Name displayed in each sector.

### link(string)

Link address that redirects to when this sector is clicked. Only useful when [series-sunburst.nodeClick](~series-treemap.nodeClick) is set to be `'link'`.
Link address that redirects to when this sector is clicked. Only useful when [series-sunburst.nodeClick](~series-sunburst.nodeClick) is set to be `'link'`.

See [series-sunburst.data.target](~series-sunburst.data.target).

Expand All @@ -216,13 +218,6 @@ Like `target` attribute of HTML `<a>`, which can either be `'blank'` or `'self'`
state = 'normal'
) }}

## labelLayout(Object|Function)

{{ use: partial-sunburst-state(
prefix = "#",
state = 'normal'
) }}

### emphasis

Emphasis state.
Expand Down Expand Up @@ -252,7 +247,12 @@ Select state.

### children(Array)

子节点,递归定义,格式同 [series-sunburst.data](~series-sunburst.data)
The children nodes defined recursively. The structure is the same as [series-sunburst.data](~series-sunburst.data).

{{ use: partial-sunburst-state(
prefix = "##",
state = 'normal'
) }}

## nodeClick(boolean|string) = 'rootToNode'

Expand Down Expand Up @@ -287,6 +287,12 @@ If there is no `name`, whether need to render it.
state = 'normal'
) }}

## labelLayout(Object|Function)

{{ use: partial-label-layout(
prefix = "##"
) }}

{{ use: partial-sunburst-itemStyle-props(
prefix = "#",
state = 'normal'
Expand Down
2 changes: 1 addition & 1 deletion en/tutorial/renderer.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

Most of browser-side charting libraries use SVG or Canvas as their underlying renderer. In the scope of Apache ECharts<sup>TM</sup>, they are usually alternative, without critical differences. But in some environment and scenarios, they show notable differences in performance or functionality.

ECharts has been using Canvas as its renderer (use VML for IE8-) from the beginning. As of [ECharts v3.8](https://github.com/apache/echarts/releases) we provide an SVG renderer (beta version) as another option. Either of them can be used by specifing parameter [renderer](api.html#echarts.init) as `'canvas'` or `'svg'` when initailizing a chart instance.
ECharts has been using Canvas as its renderer (use VML for IE8-) from the beginning. As of [ECharts v3.8](https://github.com/apache/echarts/releases) we provide an SVG renderer (beta version) as another option. Either of them can be used by specifing parameter [renderer](api.html#echarts.init) as `'canvas'` or `'svg'` when initializing a chart instance.

> Both SVG and Canvas, which are very different rendering implementations, are supported in ECharts by leveraging the Canvas and SVG renderers offered by the [zrender](https://github.com/ecomfe/zrender) library.
Expand Down
4 changes: 2 additions & 2 deletions zh/option/component/graphic.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ myChart.setOption({
{
type: 'image',
style: {
image: 'http://xxx.xxx.xxx/a.png',
image: 'http://example.website/a.png',
x: 100,
y: 200,
width: 230,
Expand Down Expand Up @@ -249,7 +249,7 @@ myChart.setOption({
left: 'center', // 水平定位到中间
bottom: '10%', // 定位到距离下边界 10% 处
style: {
image: 'http://xxx.xxx.xxx/a.png',
image: 'http://example.website/a.png',
width: 45,
height: 45
}
Expand Down
2 changes: 1 addition & 1 deletion zh/option/component/legend.md
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,7 @@ ${name}的图形样式。其属性的取值为 `'inherit'` 时,表示继承系
defaultColor = 'inherit',
defaultBorderColor = 'inherit',
defaultBorderWidth = 'auto',
defaultBorderWidthDesc = '当其值为 `"auto"` 时,如果系列有 `borderWidth` 取 2,如果系列没有 `borderWidth` 则取 0。当其值为 `"inehrit"` 时,始终取系列的 `borderWidth`。',
defaultBorderWidthDesc = '当其值为 `"auto"` 时,如果系列有 `borderWidth` 取 2,如果系列没有 `borderWidth` 则取 0。当其值为 `"inherit"` 时,始终取系列的 `borderWidth`。',
defaultType = 'inherit',
defaultOpacity = 'inherit',
defaultShadowBlur = 0,
Expand Down
2 changes: 1 addition & 1 deletion zh/option/partial/icon.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ ECharts 提供的标记类型包括

URL 为图片链接例如:
```
'image://http://xxx.xxx.xxx/a/b.png'
'image://http://example.website/a/b.png'
```

URL 为 `dataURI` 例如:
Expand Down
2 changes: 1 addition & 1 deletion zh/option/series/pictorialBar.md
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,7 @@ option = {
var textureImg = new Image();
textureImg.src = 'data:image/jpeg;base64,...'; // dataURI
// 或者
// textureImg.src = 'http://xxx.xxx.xxx/xx.png'; // URL
// textureImg.src = 'http://example.website/xx.png'; // URL
...
itemStyle: {
color: {
Expand Down
6 changes: 6 additions & 0 deletions zh/option/series/pie.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,12 @@ const option = {

是否在数据和为`0`(一般情况下所有数据为`0`) 的时候仍显示扇区。

## percentPrecision(number) = 2

<ExampleUIControlNumber min="0" default="2" />

饼图百分比数值的精度,默认保留小数点后两位。

{{ use: partial-cursor() }}

{{ use: partial-rect-layout-width-height(
Expand Down
22 changes: 13 additions & 9 deletions zh/option/series/sunburst.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@

# series.sunburst(Object)

[旭日图(Sunburst)](https://en.wikipedia.org/wiki/Pie_chart#Ring_chart_/_Sunburst_chart_/_Multilevel_pie_chart)由多层的环形图组成,在数据结构上,内圈是外圈的父节点。因此,它既能像[饼图](~series-pie)一样表现局部和整体的占比,又能像[矩形树图](~series-treemap)一样表现层级关系。
[旭日图(Sunburst)](https://en.wikipedia.org/wiki/Pie_chart#Ring_chart,_sunburst_chart,_and_multilevel_pie_chart)由多层的环形图组成,在数据结构上,内圈是外圈的父节点。因此,它既能像[饼图](~series-pie)一样表现局部和整体的占比,又能像[矩形树图](~series-treemap)一样表现层级关系。

**示例:**

Expand All @@ -135,7 +135,7 @@

**数据下钻**

旭日图默认支持数据下钻,也就是说,当用户点击了某个扇形块之后,将会以该节点作为根结点显示,并且在中间出现一个返回上层节点的圆。如果不希望有数据下钻功能,可以通过将 [series-sunburst.nodeClick](~series-treemap.nodeClick) 设置为 `false` 实现。
旭日图默认支持数据下钻,也就是说,当用户点击了某个扇形块之后,将会以该节点作为根结点显示,并且在中间出现一个返回上层节点的圆。如果不希望有数据下钻功能,可以通过将 [series-sunburst.nodeClick](~series-sunburst.nodeClick) 设置为 `false` 实现。

<ExampleBaseOption name="sunburst" title="基础旭日图" title-en="Basic Sunburst">
const data = [{
Expand Down Expand Up @@ -365,13 +365,6 @@ const option = {
state = 'normal'
) }}

## labelLayout(Object|Function)

{{ use: partial-sunburst-state(
prefix = "#",
state = 'normal'
) }}

### emphasis

高亮状态配置。
Expand Down Expand Up @@ -403,6 +396,11 @@ const option = {

子节点,递归定义,格式同 [series-sunburst.data](~series-sunburst.data)

{{ use: partial-sunburst-state(
prefix = "##",
state = 'normal'
) }}

## nodeClick(boolean|string) = 'rootToNode'

<ExampleUIControlEnum default="rootToNode" options="rootToNode,link" />
Expand Down Expand Up @@ -436,6 +434,12 @@ function(nodeA, nodeB) {
state = 'normal'
) }}

## labelLayout(Object|Function)

{{ use: partial-label-layout(
prefix = "##"
) }}

{{ use: partial-sunburst-itemStyle-props(
prefix = "#",
state = 'normal'
Expand Down

0 comments on commit 5aa5e5c

Please sign in to comment.