Feature: BaseLayer 上的 Active 属性“activeOption.Color“ 能支持数据映射
Open
- Dominant language
- TypeScript
- Stars
- 4.1k
- Forks
- 656
- PR merge metrics
- No merged PRs in 30d
Description
Feature需求: 期望在Hover时设置一个active 的hover样式,这个hover样式与绑定的数据值有关系。比如如下需求:
PolygonLayer 上不同省市的填充值与该省的GDP有关系,GDP越大颜色越深,我们想实现当Hover某一个瓦片时,能够在这个fill填充设上做一个二次渐变,比如加深操作,所以不同的省市瓦片对hover的activeOptions.color 不是一个确定值,期望是一个CallBack:
`layer.active({
color: (props) => { return props.hoverColor }
})`
Contributor guide
Research direction
Start at the BaseLayer active implementation and the PolygonLayer hover path, then trace how activeOptions.color is applied. Confirm that the callback receives the hovered feature's props and that its returned color controls that feature's hover style, including the GDP-dependent example.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- data-visualization
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100