No way to bring up ECharts-GL tooltip on mobile device

2hh7jdfx  于 5个月前  发布在  Echarts
关注(0)|答案(8)|浏览(114)

General Questions

Issue Type

  • I have a question to ask about how to use ECharts to ...;我想提问如何使用 ECharts 实现某功能
  • I have a bug to report;我想要报 bug
  • [x ] Since tooltip comes up via a mouse hover event, there’s no way to bring up tooltip on a ECharts-GL chart in a mobile device.Please enhance ECharts-GL extension so that a long press triggers the tooltip, followed by tracking the user touch.
  • I have a feature to enhance, e.g.: The current feature should be improved in the way that ...;我希望改进某个功能
  • There's something wrong with the documents;文档有些问题
  • Others, or I'm not sure which issue types to choose here;其他,或我不知道应该选什么类型

Issue Details

There’s currently no way to bring up a tooltip for a 3D chart using ECharts-GL extension on a mobile device.

Expected Behavior

I expect that a 3D chart’s tooltip can be shown on a mobile device. Currently there’s no way to do that, since the tooltip is triggered by a mouse hover event, which doesn’t exist on a mobile device such as an iPhone or iPad.

Also I expect it to work the way other chart packages tooltips work on mobile, first you do a long touch, which triggers the tooltip to come up and then while keeping your finger down move it around and have the tooltip follow the touch. This is absolutely needed for a mobile device.

You have a workaround for your 2D charts, please come up with one for your 3D charts.

Current Behavior

For a 3D chart on an iPhone or iPad, touch events are only used for rotating or zooming on the device. If I try to check what a particular point is on a surface or 3D bar chart, there’s no way to trigger the tooltip. This makes your 3D charts not very useful on mobile.

Online Example

Just bring up any of the ECharts-GL 3D demo charts on an iPhone, iPad or Android device and try to bring up a tooltip. You cannot! Try this one on an iPhone or iPad:
https://ecomfe.github.io/echarts-examples/public/editor.html?c=simple-surface&gl=1

Topics

Anything Else We Need to Know

Environment

  • ECharts GL - all versions
  • It happens only on certain browsers or operating systems. 对于特定浏览器或操作系统才会出现的问题,请提供相应环境信息:{BROWSER_VERSION_OR_OS_INFORMATION_HERE}
ni65a41a

ni65a41a1#

Any updates on this issue?

wfauudbj

wfauudbj2#

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)

fkaflof6

fkaflof63#

@SalCat@javadrajabi Actually you can comment this line code HandlerProxy.ts to support touchable device handle mouse events.

tkclm6bt

tkclm6bt4#

Exactly which line should be commented out in that file? That wasn’t clear…

Sent from my iPad

On Apr 20, 2021, at 4:26 AM, 7cat ***@***.***> wrote:  @SalCat@javadrajabi Actually you can comment this line code HandlerProxy.ts to support touchable device handle mouse events. — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

7cwmlq89

7cwmlq895#

Exactly which line should be commented out in that file? That wasn’t clear

Sent from my iPad
On Apr 20, 2021, at 4:26 AM, 7cat ***@***.***> wrote:  @SalCat@javadrajabi Actually you can comment this line code HandlerProxy.ts to support touchable device handle mouse events. — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

You can comment out line 4319 in https://github.com/apache/echarts/blob/master/dist/echarts.js . I don't know the exact line for minified version, but I think you can minify after commenting out.

sczxawaw

sczxawaw6#

@SalCat@javadrajabi Actually you can comment this line code HandlerProxy.ts to support touchable device handle mouse events.

Cool, It works !!!

iezvtpos

iezvtpos7#

Any estimates as to when this will be available?

Thank you.

whhtz7ly

whhtz7ly8#

Any updates on this issue?

相关问题