Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

使用datazoom请求数据生成新图表后,新图表中无法使用reset按钮怎么办 #19851

Open
sweetheartbaby opened this issue Apr 19, 2024 · 1 comment
Labels
new-feature pending We are not sure about whether this is a bug/new feature.

Comments

@sweetheartbaby
Copy link

sweetheartbaby commented Apr 19, 2024

What problem does this feature solve?

给chart绑定了datazoom事件,获取到新的起止时间后,会去后端发请求,请求到新的图表数据后会更新chart数据;会生成一个新的chart,这个时候新chart的zoom reset没有被选中,没有办法rest数据怎么办?
` <Chart
ref="chartContainer"
:option="chartOption"
style="width: 100%; height: 300px; margin-bottom: 8px"
@datazoom="onDataZoom"
/>
const onDataZoom = (e: any) => {
if (e) {
if (e.batch.length !== 0) {
if (Object.keys(e.batch[0]).indexOf('startValue') !== -1) {
const timeRanger = {
started_at: Math.floor(e.batch[0].startValue / 1000),
ended_at: Math.round(e.batch[0].endValue / 1000),
};
emits('update:zoom', timeRanger);
}
}
}
};

What does the proposed API look like?

请问一下zoom reset上触发的事件名是

@echarts-bot echarts-bot bot added the pending We are not sure about whether this is a bug/new feature. label Apr 19, 2024
Copy link

echarts-bot bot commented Apr 19, 2024

@sweetheartbaby It seems you are not using English, I've helped translate the content automatically. To make your issue understood by more people and get helped, we'd like to suggest using English next time. 🤗

TRANSLATED

TITLE

May I ask which event will be triggered by clicking the zoom reset button?

@sweetheartbaby sweetheartbaby changed the title 请问一下点击zoom reset按钮会触发哪个事件呀 使用datazoom请求数据生成新图表后,新图表中无法使用reset按钮怎么办 Apr 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new-feature pending We are not sure about whether this is a bug/new feature.
Projects
None yet
Development

No branches or pull requests

1 participant