Parvez Shah,

There is another example might be related to this issue:
https://echarts.apache.org/examples/en/editor.html?c=line-pen

This example use the API
```js
var pointInGrid = myChart.convertFromPixel('grid', pointInPixel);
```
to calculate the "value extent" of axes from pixels.

Currently, it might be the only way to get the "value extent" of an axis.
That is,
(1) Firstly, we should know the the pixel of the four corner of a
"grid(cartesian)",
for example: [10,10] [500, 10] [500, 700] [10, 700]
(2) Use the API
https://echarts.apache.org/en/api.html#echartsInstance.convertFromPixel
```js
var valueInLeftTop = myChart.convertFromPixel('grid', [10,10]);
var valueInRightTop = myChart.convertFromPixel('grid', [500, 10]);
var valueInRightBottom = myChart.convertFromPixel('grid', [500, 700]);
var valueInLeftBottom = myChart.convertFromPixel('grid', [10, 700]);
```

Does that satisfy your requirement?


Thanks,
------------------------------
 Su Shuang (100pah)
------------------------------



On Thu, 18 Jun 2020 at 22:34, Parvez Shah <parvez.s...@mytradewall.com>
wrote:

> Finding maximum and minimum x, y-axis value of visible chart area.
> use case: on click of button need to draw a line on the chart. I am
> following this example for the same
> https://echarts.apache.org/examples/en/editor.html?c=line-draggable
>
> setting data for the series as
> var data = [[10, 40], [10, 10]];
>  but as my chart is zoomable how do i get maximum and minimum x, y-axis
> value of visible chart area, so that i can compute coordinate for the line
> on run time
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscr...@echarts.apache.org
> For additional commands, e-mail: dev-h...@echarts.apache.org
>
>

Reply via email to