Jump to content
JChartFX Community
  • 0
Onofrio Comes

jQuery Attach Event


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/


Share this post

Link to post
Share on other sites

1 answer to this question

Recommended Posts

  • 0

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


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))




Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now