Jump to content
JChartFX Community
  • 0

click event on pie chart


Janusz

Question

2 answers to this question

Recommended Posts

  • 0

How you connect to the click event depens if you are using jquery or not.

Using jQuery

         $("#myDiv").click(function(evt) {

             onChartClick(evt);

        });

Not using jQuery
 
            var divHolder = document.getElementById('myDiv');
            divHolder.onclick = onChartClick;
 
To get the info you inspect the hitType, series and point properties of the "evt" object passed to the handler, e.g.
 
function onChartClick(evt)
{
     if (evt.hitType == cfx.HitType.Point) {
         var s = "Series " + evt.series + " Point " + evt.point;
         alert(s);
     }
}
 
JuanC 
Link to comment
Share on other sites

  • 0

HI JuanC,

I am developing one application where I have applied the above mentioned method. This works in desktop mozilla and chrome but not working in mobile and safari.

 

I have uploaded the code in the below link please check. My project is with jquery and jquery mobile.

http://stagingpc.com/demo-project/jquery-try/jchartfx/

 

It will be helpful if you can give any solution.

 

Thanks.

Link to comment
Share on other sites

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.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...