antvis / antvis/G2Plot

🤔 [QUESTION]Slider如何监听变化

Open
#3,844 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
如题

### 💻 Link to minimal reproduction

···
const t1 = new Line("t1", {
data,
padding: "auto",
xField: "Date",
yField: "scales",
xAxis: {
tickCount: 5,
},
slider: {
start: 0.1,
end: 0.5,
},
});
t1.on("slider:change", (event) => {
console.log(event);
});

t1.render();
···
### 🏞 Expected result

### 🚑 Any additional [like screenshots]

* **G2Plot Version:2.4.32**:
* **Platform:macos**:

Contributor guide

Open the contributing guide

Research direction

Start with the provided Line chart reproduction, including the slider configuration and the `slider:change` listener. Check the G2Plot event documentation or relevant slider API entry point to determine the supported usage, then document a confirmed example and expected event payload.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
data-visualization
Issue type
Documentation
Difficulty
1/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.