apache / echarts

Apache ECharts is a powerful, interactive charting and data visualization library for browser
https://echarts.apache.org
Apache License 2.0
60.69k stars 19.62k forks source link

[Feature] Control the Y zoom range via API and Option #20459

Closed electroheadfx closed 3 weeks ago

electroheadfx commented 3 weeks ago

What problem does this feature solve?

I have setup min and max of Y axis, controlled by the app, when echarts open I apply a percent xAxis pre-zoom to dataZoom via api, but I would like too apply to yAxis. Is the dataZoom may be independant axiss ?

What does the proposed API look like?

Via API or option we could setup the config with:

const dataZoom = [
    {
      // dataZoom inside for all measures
      type: 'inside',
      Xstart: initZoomState[0], // actually its : start: initZoomState[0]
      Xend: initZoomState[1], // acutually its : end: initZoomState[1]
     Ystart: initZoomState[0], // NEW !
     Yend: initZoomState[1], // NEW
    }
  ]
electroheadfx commented 3 weeks ago

hmm I can do that if I setup start and end on any abject with the axis specified:

const dataZoom = [
    {
      type: 'inside',
     xAxisIndex: 0 // <-- here
     start: initZoomState[0], // NEW !
     end: initZoomState[1], // NEW
    },
     {
      type: 'inside',
     yAxisIndex: 0 // <-- here
     start: initZoomState[0], // NEW !
     end: initZoomState[1], // NEW
    }
  ]