This is a migrated thread and some comments may be shown as answers.

How to bypass FastClick with DataViz Chart

3 Answers 211 Views
Chart-
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Joe
Top achievements
Rank 2
Joe asked on 21 Apr 2015, 08:01 PM

We have a web app that is used heavily with iPads and iPhones.  We are using FastClick (https://github.com/ftlabs/fastclick) to eliminate the 300ms wait time for mobile/tablet users.  

This makes everything snappier, but the interaction with the chart (using SVG rendering) is spotty.  Sometimes tapping works, sometimes not. â€‹Users need to be able to do normal chart interactions like tap a point to see the value and toggle series on/off in the legend.

FastClick has a built-in way to bypass it for a given element.  You add the "needsclick" CSS class, and it leaves that element alone.  I put this CSS class on the <div> the chart is rendered in, but each clickable element in the chart apparently also needs to have the "needsclick" class added to it.

Is this possible?

3 Answers, 1 is accepted

Sort by
0
T. Tsonev
Telerik team
answered on 23 Apr 2015, 04:00 PM
Hi,

We do handle touch events directly so they shouldn't incur a delay. What might happen is that the series points are too small to be reliably clicked.
I have a snippet that demonstrates how to make the touch targets larger. Does this work better for you?

Regards,
T. Tsonev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Joe
Top achievements
Rank 2
answered on 24 Apr 2015, 09:22 PM

Thanks for the response, but that didn't work.  I think FastClick is conflicting with some of the internal touch/pointer handling in the chart.

 Is there a way to add a CSS class to the markers and the legend elements?  Those are the clickable/touchable pieces, so if I can add "needsclick" to those, FastClick is supposed to ignore those elements.

0
Joe
Top achievements
Rank 2
answered on 24 Apr 2015, 11:54 PM
I gave up. I added "needsclick" to all SVG elements after the chart rendered, and the iPad clicking was still really weird. Sometimes it worked, but not consistently.I think these libraries are both trying to solve the same problem and stepping on each other to do it, so I removed FastClick.
Tags
Chart-
Asked by
Joe
Top achievements
Rank 2
Answers by
T. Tsonev
Telerik team
Joe
Top achievements
Rank 2
Share this question
or