Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: interval geometry 支持配置图形背景,支持图表: 柱、条形图,玉珏图 #2190

Merged
merged 6 commits into from
Jan 8, 2021
Merged
Show file tree
Hide file tree
Changes from 3 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
26 changes: 4 additions & 22 deletions docs/api/plots/bar.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,40 +57,22 @@ Whether the plot is Percent Bar. When isPercent is `true`, isStack must be `true

### Graphic Style

#### barWidthRatio

<description>**optional** _number_</description>

The ratio of bar width( Range:[0-1] ).

#### minBarWidth

<description>**optional** _number_</description>
`markdown:docs/common/color.zh.md`

The min width of bar, pixel value。
`markdown:docs/common/bar-style.en.md`

#### maxBarWidth
#### barWidthRatio

<description>**optional** _number_</description>

The max width of bar, pixel value。
The ratio of bar width( Range:[0-1] ).

#### marginRatio

<description>**optional** _number_</description>

The ratio of spacing between columns in groups( Range:[0-1] ), only for Grouped Bar.

#### barStyle

<description>**optional** _StyleAttr | Function_</description>

Bar graphic Style.

`markdown:docs/common/shape-style.en.md`

`markdown:docs/common/color.en.md`

### Plot Components

`markdown:docs/common/component.en.md`
Expand Down
25 changes: 4 additions & 21 deletions docs/api/plots/bar.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,39 +57,22 @@ order: 3

### 图形样式

#### barWidthRatio

<description>**optional** _number_</description>
`markdown:docs/common/color.zh.md`

条形图宽度占比 [0-1]。
`markdown:docs/common/bar-style.en.md`

#### minBarWidth
#### barWidthRatio

<description>**optional** _number_</description>

条形图最小宽度设置,像素值。

#### maxBarWidth

<description>**optional** _number_</description>
条形图宽度占比 [0-1]。

条形图最大宽度设置,像素值。
#### marginRatio

<description>**optional** _number_</description>

分组中柱子之间的间距 [0-1],仅对分组条形图适用。

#### barStyle

<description>**optional** _StyleAttr | Function_</description>

柱子样式配置。

`markdown:docs/common/shape-style.zh.md`

`markdown:docs/common/color.zh.md`

### 图表组件

`markdown:docs/common/component.zh.md`
Expand Down
26 changes: 4 additions & 22 deletions docs/api/plots/column.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,40 +57,22 @@ order: 2

### Geometry Style

#### columnWidthRatio

<description>**optional** _number_</description>

柱状图宽度占比 [0-1]。

#### minColumnWidth

<description>**optional** _number_</description>
`markdown:docs/common/color.en.md`

The min width of column, pixel value。
`markdown:docs/common/column-style.en.md`

#### maxColumnWidth
#### columnWidthRatio

<description>**optional** _number_</description>

The max width of column, pixel value
柱状图宽度占比 [0-1]

#### marginRatio

<description>**optional** _number_</description>

分组中柱子之间的间距 [0-1],仅对分组柱状图适用。

#### columnStyle

<description>**optional** _StyleAttr | Function_</description>

柱子样式配置。

`markdown:docs/common/shape-style.en.md`

`markdown:docs/common/color.en.md`

### Plot Components

`markdown:docs/common/component.en.md`
Expand Down
26 changes: 4 additions & 22 deletions docs/api/plots/column.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,40 +59,22 @@ order: 2

### 图形样式

#### columnWidthRatio

<description>**optional** _number_</description>

柱状图宽度占比 [0-1]。

#### minColumnWidth

<description>**optional** _number_</description>
`markdown:docs/common/color.zh.md`

柱状图最小宽度设置,像素值。
`markdown:docs/common/column-style.zh.md`

#### maxColumnWidth
#### columnWidthRatio

<description>**optional** _number_</description>

柱状图最大宽度设置,像素值
柱状图宽度占比 [0-1]

#### marginRatio

<description>**optional** _number_</description>

分组中柱子之间的间距 [0-1],仅对分组柱状图适用。

#### columnStyle

<description>**optional** _StyleAttr | Function_</description>

柱子样式配置。

`markdown:docs/common/shape-style.zh.md`

`markdown:docs/common/color.zh.md`

### 图表组件

`markdown:docs/common/component.zh.md`
Expand Down
66 changes: 65 additions & 1 deletion docs/api/plots/radial-bar.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,68 @@ title: Radial Bar
order: 25
---

`markdown:docs/api/plots/radial-bar.zh.md`
### Plot Container

`markdown:docs/common/chart-options.zh.md`

### Data Mapping

#### data 📌

<description>**required** _array object_</description>

Configure the data source. The data source is a collection of objects. For example:`[{ time: '1991',value: 20 }, { time: '1992',value: 30 }]`.

`markdown:docs/common/xy-field.zh.md`

`markdown:docs/common/meta.zh.md`

### Geometry Style

#### radius

<description>**optional** _number_ _default:_ `1`</description>

Radius of Polar coordinate. Value can be: (0, 1]

#### innerRadius

<description>**optional** _number_</description>

InnerRadius of Polar coordinate. Value can be: (0, 1]

#### maxAngle

<description>**optional** _number_ _default:_ `240`</description>

Specify the maximum rotation angle of the bar, determined by the maximum value in data. The maximum value is 360 degrees.

#### type

<description>**optional** _string_</description>

Display type of plot. You can specify `type: 'line'` to display a `Radial-Line` plot.

`markdown:docs/common/bar-style.en.md`

`markdown:docs/common/color.zh.md`

### Plot Components

`markdown:docs/common/component.zh.md`

### Event

`markdown:docs/common/events.zh.md`

### Plot Method

`markdown:docs/common/chart-methods.zh.md`

### Plot Theme

`markdown:docs/common/theme.zh.md`

### Plot Interactions

`markdown:docs/common/interactions.zh.md`
33 changes: 8 additions & 25 deletions docs/api/plots/radial-bar.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,59 +11,42 @@ order: 25

#### data 📌

**必选**, _array object_
<description>**必选** _array|object_</description>

功能描述: 设置图表数据源

默认配置: 无

数据源为对象集合,例如:`[{ time: '1991',value: 20 }, { time: '1992',value: 30 }]`。

`markdown:docs/common/xy-field.zh.md`

`markdown:docs/common/meta.zh.md`

#### type

**可选**, _string_

功能描述: 图表类型, 'line' 为线形图。

默认配置: 无

### 图形样式

#### radius

**可选**, _string_
<description>**可选** _number_ _default:_ `1`</description>

功能描述: 半径, 0 ~ 1。

默认配置: `1`

#### innerRadius

**可选**, _number_;
<description>**可选** _number_</description>

功能描述: 内径,0 ~ 1。

#### maxAngle

**可选**, _number_
<description>**可选** _number_ _default:_ `240`</description>

功能描述: 最大旋转角度,由 data 中最大的数值决定,最大值是 360 度。

默认配置: 240

#### barStyle

**可选**, _StyleAttr | Function_
#### type

功能描述: 样式配置 。
<description>**可选** _string_</description>

默认配置: 无
功能描述: 图表类型, 'line' 为线形图。

`markdown:docs/common/shape-style.zh.md`
`markdown:docs/common/bar-style.zh.md`

`markdown:docs/common/color.zh.md`

Expand Down
40 changes: 40 additions & 0 deletions docs/common/bar-style.en.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@

#### minBarWidth

<description>**optional**, _number_</description>

Specify the min width of bar, pixel value. Auto adapt by default.

#### maxBarWidth

<description>**optional**, _number_</description>

Specify the max width of bar, pixel value. Auto adapt by default.

#### barStyle

<description>**optional** _StyleAttr | Function_</description>

Bar graphic Style.

`markdown:docs/common/shape-style.zh.md`


#### barBackground.style

<description>**optional** _StyleAttr_</description>

Background style of bar graphic

Example:

```ts
{
barBackground: {
style: {
fill: '#000',
fillOpacity: 0.25,
}
}
}
```
40 changes: 40 additions & 0 deletions docs/common/bar-style.zh.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@

#### minBarWidth

<description>**可选**, _number_</description>

功能描述: 柱子的最小宽度设置。

#### maxBarWidth

<description>**可选**, _number_</description>

功能描述: 柱子的最大宽度设置。

#### barStyle

<description>**可选** _StyleAttr | Function_</description>

功能描述: 样式配置 。

`markdown:docs/common/shape-style.zh.md`


#### barBackground.style

<description>**可选** _StyleAttr_</description>

功能描述:柱子的背景样式配置 。

Example:

```ts
{
barBackground: {
style: {
fill: '#000',
fillOpacity: 0.25,
}
}
}
```
Loading