antvis / antvis/LarkMap

🐛 ChoroplethLayer组件的onCreated方法中监听不到legend的变化

Open
#187 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
87
Forks
34
PR merge metrics
No merged PRs in 30d

Description

/### 使用[ChoroplethLayer行政区下钻组件](https://larkmap.antv.antgroup.com/components/layers/composite-layers/choropleth-layer#%E4%BA%8B%E4%BB%B6%E7%9B%91%E5%90%AC)时,想监听 legend 改变的方法,发现没有生效
```
{
layer?.on('legend:color', () => console.log('监听legend:color')); // 无效,没有打印语句
layer?.on('legend', () => console.log('监听legend')); // 无效,没有打印语句
layer?.on('dataUpdate', () => console.log('监听legend')); // 生效,有打印语句
}}
/>
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at the ChoroplethLayer component and its onCreated callback, then trace how the legend:color, legend, and dataUpdate events are emitted. Reproduce the example from the linked event-listening documentation; done means the intended legend-change callback is observable while the existing dataUpdate behavior remains intact.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
data-visualization, frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.