Home forums Using CanvasJS Disable touch support

Tagged: ,

This topic contains 22 replies, has 9 voices, and was last updated by  kunlun122 7 months, 3 weeks ago.

Viewing 15 posts - 1 through 15 (of 23 total)
  • Author
    Posts
  • #5451

    havard
    Participant

    I’m using a CanvasJS chart on a site with a responsive design and the chart fills the entire width when browsing the site with a smart phone.

    Due to touch events being registered when trying to it’s not possible to scroll past the chart.

    Is there a way to disable touch support for touch devices?

    #5452

    havard
    Participant

    I did a brute force attempt to unbind events with

    $('canvas').unbind('touchstart touchmove touchend mouseenter mouseleave click mousedown mouseup');

    But no success.

    #5459

    Sunil Urs
    Keymaster

    Havard,

    I’ve come across this issue in the past. Disable touch events is one way to fix the issue. But am not sure if that the right way to go. As of now am busy with v1.3 GA release. Have added this to v1.3.1 – might take around two weeks. But I’ll try to give you an intermediate build before that time.


    Sunil Urs

    #5462

    havard
    Participant

    Thanks for your response. If I understand you correctly, there will be a way of disabling the touch feature when initializing the chart?

    #5463

    Sunil Urs
    Keymaster

    I’ll figure out a way to scroll past the chart – with or without an option to disable touch.

    #6066

    s10wen
    Participant

    I’m also running into this issue, I tried using jQuery / Modernizr to disable pointer events, but it didn’t work 🙁

    if (Modernizr.touch) {
    $(‘#chartContainer1’).css(‘pointer-events’, ‘none’);
    }

    Did you manage to find a fix for this issue please?

    #6090

    Sunil Urs
    Keymaster

    We are really sorry about the delay. We don’t have a solution yet. Will be taking this up on priority today and will get back with a timeline soon.


    Sunil Urs

    #6108

    Sunil Urs
    Keymaster

    Here is an intermediate build that fixes the problem.


    Sunil Urs

    #6109

    s10wen
    Participant

    Awesome! Tested and can confirm it works on iPhone 🙂

    #6139

    Peter
    Participant

    How do you disable touch?
    I have downloaded the intermediate build, but I can’t find an option for it. I have also tried the jquery examples above, but with no success (maybe because of my very limited jquery expierence). I am using Windows Phone 8.

    #6149

    Sunil Urs
    Keymaster

    Peter,

    In this version disabling touch is still not available. But I’ve fixed a bug due to which scrolling through page was not possible by dragging on the chart. I’ll be adding option to disable interactivity in the 1.4 GA – by the end of next week.


    Sunil Urs

    • This reply was modified 2 years, 8 months ago by  Sunil Urs.
    #7181

    Daniel Silva
    Participant

    Hi,

    I’m using version 1.5.1 and having problems scrolling on a tablet.
    When touching a chart show’s the tooltip and cant scroll.

    Br,
    Daniel

    #7182

    Daniel Silva
    Participant

    I have found the option, interactivityEnabled.

    Thx

    #7184

    Sunil Urs
    Keymaster

    Daniel,

    May I know which Tablet & Browser you were trying on?…. We’ve already fixed that issue. Now the behavior is that the pointer gets locked to chart only when the user touches and holds for a moment. But if you directly try to scroll up vertically without pausing, it should let you scroll.


    Sunil Urs

    #7185

    Daniel Silva
    Participant

    I’m using Samsung Tab S 8.4 & Google Chrome.
    Only using interactivityEnabled=false I was able to scroll.

Viewing 15 posts - 1 through 15 (of 23 total)

You must be logged in to reply to this topic.