Skip to content

Commit

Permalink
Merge pull request #3608 from VisActor/docs/scrollMask
Browse files Browse the repository at this point in the history
docs: supply documents for `scrollMask` of discrete legend
  • Loading branch information
xile611 authored Jan 3, 2025
2 parents 21b74c7 + 45f9f69 commit b90bfef
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 0 deletions.
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

0 comments on commit b90bfef

Please sign in to comment.