antvis / antvis/G2Plot

🤔 [QUESTION]用api去设置silder的状态,然后annomation不消失

Open
#3,467 0 comments 0 reactions 0 assignees View on GitHub
Question
Dominant language
TypeScript
Stars
2.7k
Forks
591
PR merge metrics
No merged PRs in 30d

Description

### 🐛 Question description [Please make everyone to understand it]
我有两个折线图line1和line2,然后我想要line1的slider拖动变化之后,line2的slider也跟着line1一样变化,
目前根据文档只能用
` line2.update({
slider: {
start,
end
}
});`
的方式去设置line2的slider,但是我发现这样设置之后,line2的annomation都会消失。
### 💻 Link to minimal reproduction
https://codesandbox.io/s/g2plot-reproduction-template-forked-31isgt?file=/src/index.js

### 🏞 Expected result

### 🚑 Any additional [like screenshots]
可以有api直接设置line2的slider,然后line2的annomation都不消失
* **G2Plot Version**:
2.4.19
* **Platform**:
windows pc端

Contributor guide

Open the contributing guide

Research direction

Start with the linked CodeSandbox reproduction at src/index.js, focusing on the two line charts, their sliders, and annotations. Reproduce the behavior in G2Plot 2.4.19 and inspect how line2.update changes the slider. Done means line2 follows line1's slider while its annotations remain visible.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
data-visualization
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.