What problem does this feature solve?
Hopefully the axis range could be known when it's changed.
I have y-axis scale set to true, and enabled datazoom. When I zoom or pan the chart, clearly the y-axis's range changes too. Now I need to know the new range.
I tried to listen to datazoom event but it doesn't look like any properties in the option could give me the values.
chart.on("datazoom", params => console.log(chart.getOption().yAxis[0]))
From the output I cannot see any information showing the y-axis range. Is there a way I can get it?
What does the proposed API look like?
Add a range property in the yAxis option:
yAxis: {
range: [currentMin: number, currentMax: number]
}
What problem does this feature solve?
Hopefully the axis range could be known when it's changed.
I have y-axis
scaleset totrue, and enableddatazoom. When I zoom or pan the chart, clearly the y-axis's range changes too. Now I need to know the new range.I tried to listen to
datazoomevent but it doesn't look like any properties in the option could give me the values.chart.on("datazoom", params => console.log(chart.getOption().yAxis[0]))From the output I cannot see any information showing the y-axis range. Is there a way I can get it?
What does the proposed API look like?
Add a range property in the yAxis option: