This is a migrated thread and some comments may be shown as answers.

Onclick event code behind

2 Answers 97 Views
Chart (HTML5)
This is a migrated thread and some comments may be shown as answers.
Frank
Top achievements
Rank 1
Frank asked on 13 Dec 2017, 06:30 PM

Is there such a way where I can do a onclick on the pie chart series from a code behind?  I need to redirect to another web page on a series click and in the target page, I will show a grid of the detail data base of which series it got clicked and thus would like to pass the variable using a session.

 

Thx.

2 Answers, 1 is accepted

Sort by
0
Frank
Top achievements
Rank 1
answered on 20 Dec 2017, 01:30 AM
Anyone?  If not from code behind, how do I identify which "pie series" got clicked using java script?
0
Frank
Top achievements
Rank 1
answered on 20 Dec 2017, 02:55 AM

So I tried use the javascript:

 

            function OnSclick(args) {
                alert(args.series.type);
            }

 

 

where in the html of the chart paramter I have:

 

<ClientEvents OnSeriesClick="OnSclick" />

 

I get a message box saying "pie"

 

but when I tried other such as "args.series.name" I get nothing nor .category.  

 

So what is the correct "args.series.???" in order to get the name of the series?

Tags
Chart (HTML5)
Asked by
Frank
Top achievements
Rank 1
Answers by
Frank
Top achievements
Rank 1
Share this question
or