Onofrio Comes Posted January 24, 2014 Report Share Posted January 24, 2014 Hello,we are considering the possibility to switch to the HTML5 version of ChartFX - jChartFx. In the tests which we are developing we find some difficulty to understand how to attach events using jquery. Reading the documentation: http://www.jchartfx.com/api/search/on#Chart it is not clear which object attach events using jquery. How do I hang on the MouseDown event? This is an example that we can not run http://jsfiddle.net/x2U2V/6/ Quote Link to comment Share on other sites More sharing options...
0 JuanC Posted January 28, 2014 Report Share Posted January 28, 2014 We only attach ourselves to the jquery click event to push properties such as series, point, etc. If you are handling MouseDown you could call chart1.detectEvent(evt) where evt is the event argument passed to the event handler, after this call your code can query for evt.hitType, evt.series, evt.point, etc. Note that to invoke the method on a mousedown handler when using jQueryUI you would need something like this in your jsfiddle sample $("div", ".ChartDiv1").on("mousedown",function doClick(evt){ $("div", ".ChartDiv1").chart("detectEvent", evt); if ((evt.hitType == cfx.HitType.Point) || (evt.hitType == cfx.HitType.Between)) alert(evt.point); }) JuanC Quote Link to comment Share on other sites More sharing options...
Question
Onofrio Comes
Hello,
we are considering the possibility to switch to the HTML5 version of ChartFX - jChartFx.
In the tests which we are developing we find some difficulty to understand how to attach events using jquery.
Reading the documentation: http://www.jchartfx.com/api/search/on#Chart it is not clear which object attach events using jquery.
How do I hang on the MouseDown event?
This is an example that we can not run http://jsfiddle.net/x2U2V/6/
Link to comment
Share on other sites
1 answer to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.