Welcome Guest Search | Active Topics |

mouse events on a line chart
cbolaurent
#1 Posted : Thursday, May 16, 2013 3:24:28 AM(UTC)
Rank: Newbie

Groups: jQueryDV, Registered
Joined: 2/4/2013(UTC)
Posts: 6

Thanks: 5 times
Was thanked: 0 time(s) in 0 post(s)
Just tried to add a mouse click event on my chart ... and it fails (nothing happens)

$('#chart1').bind('dataPointMouseUp', function(e, data) {
alert(1);
});

It's a line chart ... and it works with a column chart.

Does it mean that I can't detect a simple mouse click on a data point of a line chart ?
(to open a detailed view)
Dragan
#2 Posted : Thursday, May 16, 2013 11:13:25 AM(UTC)
Rank: Advanced Member

Groups: Administrators, DataVizJavaScript, jQueryChart, jQueryDV, MvcChart, Registered
Joined: 1/3/2011(UTC)
Posts: 483

Thanks: 0 times
Was thanked: 87 time(s) in 87 post(s)
Hi,

I'm checking this one and it seems to work. Do you have markers on your line chart?
Best Regards,
Dragan Matek
jqChart Inc.
cbolaurent
#3 Posted : Thursday, May 16, 2013 1:06:36 PM(UTC)
Rank: Newbie

Groups: jQueryDV, Registered
Joined: 2/4/2013(UTC)
Posts: 6

Thanks: 5 times
Was thanked: 0 time(s) in 0 post(s)
dragan wrote:
Hi,

I'm checking this one and it seems to work. Do you have markers on your line chart?


No I didn't. And you're right, adding markers make the event work.
In fact, it's obvious in a certain way.
But this particular chart have lots of points, so adding markers is visually bad.
I will make tests with different sizes and colors ...

Thanks for your help.
Dragan
#4 Posted : Thursday, May 16, 2013 1:16:57 PM(UTC)
Rank: Advanced Member

Groups: Administrators, DataVizJavaScript, jQueryChart, jQueryDV, MvcChart, Registered
Joined: 1/3/2011(UTC)
Posts: 483

Thanks: 0 times
Was thanked: 87 time(s) in 87 post(s)
'dataPointMouseUp' event in the line chart requires markers. If you don't want to have markers you can try storing the highlighted data point with:

http://www.jqchart.com/jquery/chart/ClientSideEvents/DataHighlightingEvent

and handle the mouse up event of the whole chart.
Best Regards,
Dragan Matek
jqChart Inc.
1 user thanked Dragan for this useful post.
cbolaurent on 5/17/2013(UTC)
Users browsing this topic
Guest (3)
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

FlatEarth Theme by Jaben Cargman (Tiny Gecko)
Powered by YAF 1.9.4 | YAF © 2003-2010, Yet Another Forum.NET
This page was generated in 0.078 seconds.