echarts icon indicating copy to clipboard operation
echarts copied to clipboard

[Bug] dataZoom feature in toolbox doesn't work when set yAxisIndex to contain only part of y axis

Open Annie0222 opened this issue 2 years ago • 5 comments

Version

5.4.3

Link to Minimal Reproduction

https://echarts.apache.org/examples/en/editor.html?code=PYBwLglsB2AEC8sDeAoWszGAGwEbAA8AuZNdWAMwFMBDMAVwCcqTVzyATOmgLSwFtWZdugCeAQQIQAzgEloHKsVgBtAAwBdYeQC-2veh0AaMgUkyh7MKJAtYAcgDGdKgHNgjUfZPsuYGiQq9gCyMN4OACr0VOH2AOpUHLERABb0sQBijBCxAMp0efTQ9lqGPrASUtKBbOTWtiT2AG402NH2ZMZktej1ds2t7eXoIMDSEJAwjdmuKWAdhhrl0lTZVNWq2j2c3IEAjACsakawAEwAzMdnpwAsJ6d7ABwne-cHLzcA7PcAbJrDdRs_WwEGgMX0AO26D8AVUezUV1OiNOL2esFeJy-Jz-S20vSBjRBYO8eIq5jkCiUJD2-jIWh0AG4gA

Steps to Reproduce

I have a chart that has two y axis and I want the data zoom tool only zoom data for the first y axis, so I set yAxisIndex to [0]. When I just enable the dataZoom tool in toolbox and drag an area in chart area, nothing happens. recording-2023-12-14-15-06-45

Current Behavior

Data zoom doesn't work and below error is throwed in the console. image

Expected Behavior

Data zoom works for the first y axis.

Environment

- OS: Windows 10 Enterprise
- Browser: [email protected]
- Framework: Angular@14

Any additional comments?

No response

Annie0222 avatar Dec 14 '23 07:12 Annie0222

You need to specify an xAxisIndex. For example 'none' will do.

MatthiasMert avatar Dec 14 '23 07:12 MatthiasMert

You need to specify an xAxisIndex. For example 'none' will do.

Thanks for your reply. It do work when xAxisIndex is 'none. But I want to zoom x axis as well. When I set xAxisIndex to 0, the same error is throwed in the console.

Annie0222 avatar Dec 15 '23 10:12 Annie0222

But I want to zoom x axis as well.

then you'll need a second X axis and use two grids - Demo Code ...it's becoming extra-terrestrial 🛸 👽

image

helgasoft avatar Dec 17 '23 18:12 helgasoft

But I want to zoom x axis as well.

then you'll need a second X axis and use two grids - Demo Code ...it's becoming extra-terrestrial 🛸 👽

image

Thanks for your reply. But datazoom is totally ignored by the first grid in the solution. What I really want to have is some lines are only zoomed on x-axis while other lines are zoomed on both y-axis and x-axis.

Annie0222 avatar Dec 21 '23 07:12 Annie0222

sorry, here is fixed Demo, it zooms on both y-axis and x-axis.

helgasoft avatar Dec 21 '23 07:12 helgasoft