What I have is:
- I have an image of a pie chart shown
- I have an image map of the pie chart
- The default browser tooltip is shown on mouse move over the image
What I am trying to do is:
- On pie chart slice touchmove, move the Green Marker (a div) on a circular path relative to the pie chart
What I want to achieve:
- Either show default browser tooltip on moving div circular to pie chart
- Either show values of the areas of pie on moving the Green Marker(div) around the image
How do I achieve this ?
Some Code :
Fiddle Link : here
$("img").bind("touchmove",function(event) {
e=event.originalEvent;
x1 = e.pageX;
y1 = e.pageY;
x = x1 - x0;
y = y1 - y0;
r = 180 - ((180/Math.PI) * Math.atan2(y,x));
$("#marker").css('-webkit-transform','rotate(-'+r+'deg) translate(-160px)');
// Code to show values of Pie as a tooltip or in a separate div
});