We have created a pie chart and everything works fine but we now want to add a click event to each segment so we can open a page with further information.
We added the following code within the document.ready
jQuery("#ChartDivGroups").click(function(evt) {
alert ("SET");
onChartClick(evt);
});
And the following function
function onChartClick(evt)
{
alert (evt.hitType);
if (evt.hitType == cfx.HitType.Point) {
var s = "Series " + evt.series + " Point " + evt.point;
alert(s);
}
}
When we click on the pie we get the alert "SET" followed by the alert within the function but here we get "undefined"
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.
Question
perryworld
Hi,
We have created a pie chart and everything works fine but we now want to add a click event to each segment so we can open a page with further information.
We added the following code within the document.ready
When we click on the pie we get the alert "SET" followed by the alert within the function but here we get "undefined"
We have attached the full php file
Are we missing something?
Thanks
Rich
DBGroups.php
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.