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

3d scatter demo is broken on touch devices #6784

blackChef opened this issue Jun 1, 2017 · 1 comment

3d scatter demo is broken on touch devices #6784

blackChef opened this issue Jun 1, 2017 · 1 comment


Copy link

@blackChef blackChef commented Jun 1, 2017

  • There's no touchdrag event, this should be touchmove I believe.

          'mousemove.hc touchdrag.hc': function (e) {...
  • Touch events don't have pageX or pageY. I believe we are supposed to use chartX chartY instead. Otherwise chart.pointer.normalize(eStart) would be pointless.

     eStart = chart.pointer.normalize(eStart);
     var posX = eStart.pageX,
         posY = eStart.pageY,
         alpha = chart.options.chart.options3d.alpha,
         beta = chart.options.chart.options3d.beta,
         sensitivity = 5; // lower is more sensitive
         'mousemove.hc touchdrag.hc': function (e) {
             // Run beta
             newBeta = beta + (posX - e.pageX) / sensitivity;
             chart.options.chart.options3d.beta = newBeta;

Expected behaviour

Actual behaviour

Live demo with steps to reproduce

Affected browser(s)

Copy link

@pawelfus pawelfus commented Jun 2, 2017

Thank you for reporting this issue! You are right it doesn't work with current config on touch devices, working example:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.