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

在手机浏览器(安卓、IOS)中,当echarts图表父级dom的transform进行scale缩放时,出现鼠标焦点偏移的问题。 #6083

Closed
tigerzch opened this issue Jun 28, 2017 · 10 comments
Labels
stale Inactive for a long time. Will be closed in 7 days.

Comments

@tigerzch
Copy link

One-line summary [问题简述]

在手机浏览器(安卓、IOS)中,当echarts图表父级dom的transform进行scale缩放时,出现鼠标焦点偏移的问题。

Version & Environment [版本及环境]

  • ECharts version [ECharts 版本]:3.6.2
  • Browser version [浏览器类型和版本]:移动设备浏览器
  • OS Version [操作系统类型和版本]:安卓 IOS

Expected behaviour [期望结果]

正确定位鼠标点击位置

ECharts option [ECharts配置项]

option = {

}

Other comments [其他信息]

在eChart.init目标dom 或者其父级 父级的父级 设置stlye : transform:scale(n); n!=1

@tigerzch
Copy link
Author

#3635 说的解决了这个BUG,PC浏览器上好像没这个问题了但是移动设备上还是不行。
求助

@tigerzch
Copy link
Author

没有人遇到这种情况吗?

@naeem-accessgroup
Copy link

naeem-accessgroup commented Nov 9, 2017

This bug is affecting mobile only. On desktop this is fine. Whenever you try to interact with a chart on mobile via touch, your "mouse" co-ordinates are offset. So a click at a certain point actually hits another area of the chart.

As mentioned by another user, this issue did affect desktop but was fixed on #3635. I believe DPI calculations are the reason it is still affecting mobile. It is difficult to interact with charts on mobile until this issue is fixed because trying to click on a bar always highlights a different bar.

Issue found on version 3.7.2

@jarben
Copy link
Contributor

jarben commented Jan 10, 2018

Any chance to have a look on this @pissang ? I can do more investigation if needed.

@Lestry
Copy link

Lestry commented May 7, 2018

最新版本仍然存在这个问题,PC浏览器正常,在移动设备上都不行。

@yuanxiaoyu
Copy link

yuanxiaoyu commented Aug 14, 2018

遇到同样问题,希望尽快解决

@cn-xufei
Copy link

cn-xufei commented Nov 8, 2018

希望能尽快修复,或者可以提供下解决思路

@javadrajabi
Copy link

javadrajabi commented Apr 25, 2020

i have this problem
find this issue on an Android device.
also
this issue just in 3d GL charts .
I checked and i realized that :
chart.on('click'....
this event not work. also this error is from the original library .
you can test it on this link

https://echarts.apache.org/examples/en/editor.html

past this code on editor and run ...
var chart = echarts.init(document.getElementById("chart-panel"),""); chart.on("click",(s)=>{ alert(1); });
option = { tooltip: {}, backgroundColor: '#fff', visualMap: { show: false, dimension: 2, min: -1, max: 1, inRange: { color: ['#313695', '#4575b4', '#74add1', '#abd9e9', '#e0f3f8', '#ffffbf', '#fee090', '#fdae61', '#f46d43', '#d73027', '#a50026'] } }, xAxis3D: { type: 'value' }, yAxis3D: { type: 'value' }, zAxis3D: { type: 'value' }, grid3D: { viewControl: { // projection: 'orthographic' } }, series: [{ type: 'surface', wireframe: { // show: false }, equation: { x: { step: 0.05 }, y: { step: 0.05 }, z: function (x, y) { if (Math.abs(x) < 0.1 && Math.abs(y) < 0.1) { return '-'; } return Math.sin(x * Math.PI) * Math.sin(y * Math.PI); } } }] }
this code is for web browser.
this code work on desktop device when you click on chart show alert but just not work on mobile device.
click dont work in web browser (in mobile device)

@github-actions
Copy link
Contributor

This issue has been automatically marked as stale because it did not have recent activity. It will be closed in 7 days if no further activity occurs. If you wish not to mark it as stale, please leave a comment in this issue.

@github-actions github-actions bot added the stale Inactive for a long time. Will be closed in 7 days. label Apr 26, 2022
@apache apache deleted a comment from yuanxiaoyu Apr 27, 2022
@github-actions
Copy link
Contributor

github-actions bot commented May 4, 2022

This issue has been automatically closed because it did not have recent activity. If this remains to be a problem with the latest version of Apache ECharts, please open a new issue and link this to it. Thanks!

@github-actions github-actions bot closed this as completed May 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale Inactive for a long time. Will be closed in 7 days.
Projects
None yet
Development

No branches or pull requests

7 participants