Highlighter plugin on click (instead of mouseover)

545 views
Skip to first unread message

Cláudia Matosa

unread,
Sep 12, 2012, 12:58:17 PM9/12/12
to jqplot...@googlegroups.com
Hey!

I am using jqplot with the highlighter plugin for a jQuery mobile website. The tooltip appears when I mouse over a point in the line graph. However, I wanted it to appear when I click the point instead. Is there a function inside jQPlot that does the job?

Thank you!

Cláudia Matosa

unread,
Sep 13, 2012, 6:22:56 AM9/13/12
to jqplot...@googlegroups.com
I've tried changing

$.jqplot.eventListenerHooks.push(['jqplotMouseMove', handleMove]);

at the beginning of jqplot.highlighter.js to

$.jqplot.eventListenerHooks.push(['jqplotDataClick', handleMove]);

but with no success. Maybe I'm understanding the whole thing wrong?

GayashanNA

unread,
Sep 13, 2012, 7:39:34 AM9/13/12
to jqplot...@googlegroups.com
Hi Cláudia,

Try this,

$.jqplot.eventListenerHooks.push(['jqplotClick', handleMove]);

It should work. I think what you are doing is changing the Highlighter plugin. It may not be a very good idea.

Cheers!

-Gayashan

Cláudia Matosa

unread,
Sep 13, 2012, 12:23:25 PM9/13/12
to jqplot...@googlegroups.com
Thank you so much, it worked perfectly! I know it is not the best solution, but I'll stick to it while I try to find a better one.

Thank you!!

Quarta-feira, 12 de Setembro de 2012 17:58:18 UTC+1, Cláudia Matosa escreveu:

w3perl

unread,
Sep 14, 2012, 10:24:58 AM9/14/12
to jqplot...@googlegroups.com


Le jeudi 13 septembre 2012 18:23:25 UTC+2, Cláudia Matosa a écrit :
Thank you so much, it worked perfectly! I know it is not the best solution, but I'll stick to it while I try to find a better one.

try :
 $('#chart').bind('jqplotDataClick'...
examples are available :
http://www.jqplot.com/deploy/dist/examples/area.html

Hope it helps.

Reply all
Reply to author
Forward
0 new messages