highcharts / draggable-points

MIT License
32 stars 34 forks source link

Improve column dragging on touch devices #69

Open ajeantet opened 7 years ago

ajeantet commented 7 years ago

Hello,

I find this plugin amazing :) However, when I use it with an android smartphone or Tablet, the drgging of columns is quite tricky (including the official demo). I can sometimes manage to change the value of a column but its rather a random process It seems to be improved by using a a stylus. So I think that the issue comes from the handles that are too small. I was wondering if someone had found a work around or if there was a way to thicken th handles ?

Thank you for your help

sebastianbochan commented 7 years ago

Thank you for reporting. Please let me know which version of Andorid and browser do you use?

ajeantet commented 7 years ago

I'm using Andoid 7.0 and Firefox 53.0 I've also tried with Chrome 58 on the same device, and the experience is slightly better

ajeantet commented 7 years ago

Note that in the case of a columnrange chart, the dragging seems better

ajeantet commented 7 years ago

Hello, It seems that removing the part about is3d did the trick, I don't know why... Now I can size the column from anywhere (not just the handle) which makes it easier to drag on touch devices. It's not comfortable, but it's doable

Remove Highcharts.seriesTypes.column.prototype.useDragHandle = function () { var is3d = this.chart.is3d && this.chart.is3d(); return !is3d; };

and replace if (this.useDragHandle() && (options.draggableX || options.draggableY)) by if (options.draggableX || options.draggableY)