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

Highstock problem with liveRedraw=true on touch devices(iOS ,Android) #2896

Closed
vovinh opened this issue Apr 9, 2014 · 3 comments
Closed
Labels
Status: Stale This issue hasn't had any activity for a while, and will be auto-closed if no further updates occur.

Comments

@vovinh
Copy link

vovinh commented Apr 9, 2014

Version : Highstock JS v1.3.10
I want to use liveRedraw feature of Highstock on a touch device(tested on Samsung GS3 and Iphone iOS7.1). Unfortunately, setting liveRedraw=true doesn't seem to function properly. The graph is not updated/redrawn while my finger is moving.
Example : http://jsfiddle.net/vinhvo/f86d2/
In the example, chart is only redrawn when I lift my finger.

So, I had a look at Highstock source code (highstock.src.js) and came up with my fixes as follow:

 onContainerTouchMove: function (e) {  
           if (/*e.touches.length === 1 || */e.touches.length === 2) {  
                this.pinch(e);  
           }  
      }  
if (hasTouch) {  
                container.ontouchstart = function (e) {  
                     pointer.onContainerTouchStart(e);  
                     pointer.onContainerMouseDown(e);  
                };  
                container.ontouchmove = function (e) {  
                     pointer.onContainerTouchMove(e);  
                     pointer.onContainerMouseMove(e);  
                };  
                addEvent(doc, 'touchend', pointer.onDocumentTouchEnd);  
           }  
    if (chart.mouseIsDown === 'mousedown' || chart.mouseIsDown === 'touchstart') {
            this.drag(e);
        } 
@krazibit
Copy link

krazibit commented Sep 7, 2017

@TorsteinHonsi, Any reason why the dragging/livedraw not available on touch?

@pawelfus
Copy link
Contributor

pawelfus commented Sep 7, 2017

I think this may be connected to the fact that old mobile devices had low-end hardware. It's hard to guess if a given device can run smoothly with liveRedraw.

But it's only about default value for scrollbar.liveRedraw. You can enable it, please take a look: http://jsfiddle.net/kev2w4rx/2/show/ - you can use scrollbar and see how chart adapts to the new extremes.

I think the main issue for @vovinh is scrollbar.enabled = false. Well, liveRedraw can not work without scrollbar.

Maybe you mean panning not scrollbar.liveRedraw? If that's the case you can compare how smooth are extremes changing by scrollbar vs panning (two fingers).

@stale
Copy link

stale bot commented Sep 24, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions!

@stale stale bot added the Status: Stale This issue hasn't had any activity for a while, and will be auto-closed if no further updates occur. label Sep 24, 2019
@stale stale bot closed this as completed Oct 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Stale This issue hasn't had any activity for a while, and will be auto-closed if no further updates occur.
Projects
None yet
Development

No branches or pull requests

3 participants