Jump to content
JChartFX Community
  • 0

Open popup on click of points in jchartfx



2 answers to this question

Recommended Posts

  • 0

We do not have the capability of adding id (or any other attributes) to the SVG elements but we use the sfxid attribute so that you can handle events on chart elements, e.g.


Note that we inject properties to the event object sent in HTML that includes the hitType, the series index and the point index.


If you are using jQuery


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

             if (evt.hitType == cfx.HitType.Point) {
                 var s = "Series " + evt.series + " Point " + evt.point;
If you are not using jQuery
      var divHolder = document.getElementById('myDiv');
      divHolder.onclick = doClick;
       function doClick(evt)
            alert("Series " + evt.series + " Point " + evt.point);
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.

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.

  • Create New...