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

docs: supply documents for scrollMask of discrete legend #3608

Merged
merged 1 commit into from
Jan 3, 2025
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
29 changes: 29 additions & 0 deletions docs/assets/option/en/component/legend-discrete.md
Original file line number Diff line number Diff line change
Expand Up @@ -928,6 +928,35 @@ Supported since version `1.10.0`
This configuration only applies to the scrollbar page turner
Whether the scrollbar position supports displaying in the middle of the pagination

#### scrollMask(Object)

Supported starting from version `1.12.11`.

A mask for the legend area when scrolling, before reaching the end.

##### visible(boolean) = false

Whether to display the mask.

##### gradientLength(number) = 16

Length of the gradient area of the mask.

##### gradientStops(Object)

Configuration for the gradient fill colors of the mask, for example:

```ts
scrollMask: {
visible: true,
gradientStops: [
{ offset: 0, color: 'rgba(255,255,255,1)' },
{ offset: 0.5, color: 'rgba(255,255,255,0.8)' },
{ offset: 1, color: 'rgba(255,255,255,0)' }
]
}
```

### data(Function)

Custom Configuration for Discrete Legend Data is a function that can be customized based on the original legend plotting data, for example, the value value can be customized.
Expand Down
29 changes: 29 additions & 0 deletions docs/assets/option/zh/component/legend-discrete.md
Original file line number Diff line number Diff line change
Expand Up @@ -909,6 +909,35 @@ value: {
该配置仅对滚动条翻页器生效
滚动条的位置是否支持展示在分页的中间

#### scrollMask(Object)

自`1.12.11`版本开始支持。

滚动时,图例区域未到尽头时的前后遮罩。

##### visible(boolean) = false

是否展示遮罩。

##### gradientLength(number) = 16

遮罩渐变区域长度。

##### gradientStops(Object)

遮罩的渐变填充色配置,例如:

```ts
scrollMask: {
visible: true,
gradientStops: [
{ offset: 0, color: 'rgba(255,255,255,1)' },
{ offset: 0.5, color: 'rgba(255,255,255,0.8)' },
{ offset: 1, color: 'rgba(255,255,255,0)' }
]
}
```

### data(Function)

用于离散图例数据的自定义配置,是一个函数,可以在原始图例绘制数据的基础上,进行自定义,比如可以自定义 value 值。
Expand Down
Loading