Skip to content

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

Closed

Description

@tigerzch

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

Activity

  1. tigerzch commented on Jun 28, 2017

    @tigerzch
    Author

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

  2. tigerzch commented on Jun 30, 2017

    @tigerzch
    Author

    没有人遇到这种情况吗?

  3. naeem-accessgroup commented on Nov 9, 2017

    @naeem-accessgroup

    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

  4. jarben commented on Jan 10, 2018

    @jarben
    Contributor

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

  5. Lestry commented on May 7, 2018

    @Lestry

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

  6. yuanxiaoyu commented on Aug 14, 2018

    @yuanxiaoyu

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

  7. feynmx commented on Nov 8, 2018

    @feynmx

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

  8. javadrajabi commented on Apr 25, 2020

    @javadrajabi

    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)

  9. github-actions commented on Apr 26, 2022

    @github-actions
    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.

  10. added
    stale
    on Apr 26, 2022
  11. deleted a comment from yuanxiaoyu on Apr 27, 2022
  12. github-actions commented on May 4, 2022

    @github-actions
    Contributor

    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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    stale

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions