1

I am using Rgraph to draw some graphs on canvas these html pages are loaded in an android webview using PhoneGap.. everything works fine untill i touch a graphs it redraws that graph on top of the page. i have srached alot found this

$("canvas").parents("*").css("overflow", "visible");

I have also tired position:fixed but it dint worked... Does anyone have any idea why its redrawing the graph..?

here is the screenshoot enter image description here

the 2nd graph is the original one as i touch it the duplicate graph draws on top of page

AddyProg
  • 2,960
  • 13
  • 59
  • 110
  • just a quick guess.This must be related to the 300ms issue. The web app waits for 300ms to check for touch events. This may cause the events to fire twice. You can include the fastclick.js link here.. github.com/ftlabs/fastclick. Hope it helps. – frank Jul 02 '14 at 07:04
  • @frank : thanks fro your reply I'll check it.. – AddyProg Jul 02 '14 at 07:11

1 Answers1

0

I also encounter this problem while using Chart.js and search a lot. Finally I solve this by adding overflow: hidden style to the direct parent of the canvas element.

<div class="canvas-wrap" style="overflow: hidden;">
    <canvas width="100%" height="300"></canvas>
</div>

This works for me. Hope it would also help you.

IntoCode
  • 57
  • 1
  • 6