ASP.NET - How to add hyperlinks to pie chart sections?

I have a pie chart that uses data returned from a business rules method. Is it possible to allow users to click on the segments of the pie chart by adding hyperlinks to each segment?

I know how to do this in the aspx of the pie chart, but the datasource and series of the data is based on the data returned from the method. Would you use something like: foreach series with a switch statement for the hyperlink?

How can I assign a hyperlink to the pie chart segments?

I worked out how to do this using a switch statement to assign a url and query string to specific segment names:

Point.Url = "/url?querystring"

Add Hyperlink with dynamic value in every slid in pie chart in asp.net , How can i add hyperlink with dynamic value in every slid in pie chart in asp.net c#. Remember to click “Mark as Answer” on the post, if it helps  Add user name with pie chart. Browse other questions tagged asp.net pie-chart or ask your own question. How to add hyperlinks to pie chart sections? 0.

to redirect from specific section of pie chart:

Chart1.Series[0].Points[0].Url="/url1";

Chart1.Series[0].Points[1].Url="/url2";

Chart1.Series[0].Points[2].Url="/url3";

to redirect from specific legends of pie chart:

Chart1.Series[0].Points[0].LegendUrl="/url1";

Chart1.Series[0].Points[1].LegendUrl="/url2";

Chart1.Series[0].Points[2].LegendUrl="/url3";

you can write:

Chart1.Series[0].Points[0].Url = Chart1.Series[0].Points[0].LegendUrl = "rptPendingBreakdown.aspx";

Pro ASP.NET Web Forms Techniques, 285–286 See also images; pie charts Graphics object, 291–292 graphs. See charts H HeaderTemplate section of My Cars page, 538 hierarchical page (​home.aspx), 129–176 accessibility aids for, 143–149 adding users to mailing list 132 inserting validation controls in, 213–214 links to other pages, 149–151 list of  Is it possible to hyperlink only a section of a pie chart. When we tried to do this it took both sections of the pie to the last thing that was hyperlinked. This thread is locked.

To redirect from the specific section of the pie chart.

Use:

Chart1.Series(0).Points(0).Url="/url1"

Chart1.Series(0).Points(1).Url="/url2"

Chart1.Series(0).Points(2).Url="/url3"

Adding an igPieChart, This topic contains the following sections: This procedure guides you through the process of adding a pie chart control with legend to a web page. For ASP.​NET MVC, no container elements are needed because the MVC helper adds the required This topic provides links to the API documentation for jQuery and ASP. For this particular example, I’ll use my own random data, but you can data bind values from a database. The chart samples show several different ways of populating chart data. How to Add a Pie Chart to your ASP.NET Website. 1. Drop the chart onto a web page. 2. Copy and paste the following code into your code page.

How to explode a pie chart sections in C#, c#/vb.net excel,word,pdf component. PDFViewer for ASP.NET Add a picture to the chart and assign a hyperlink to the picture When we work with Excel pie chart, we may need to separate each part of pie chart to make them stand out. Spire Code Snippet of how to set the separation width between slices in pie chart. Here Mudassar Ahmed Khan has explained with an example, how to create Charts from Database using Charts Helper class in ASP.Net MVC Razor. This article will illustrate how to create Pie Charts from Database using Charts Helper class in ASP.Net MVC Razor.

ASP.NET 3.5 Enterprise Application Development with Visual Studio , “I want to see a high-level snapshot off all activity in all my divisions, page that contains critical information displayed as graphs, links, speedometers, reports, They usually include a demo with pie charts, line graphs, or speedometers that  Let us learn about the ASP.Net chart type Pie chart that provides a powerful UI and design quality. We will learn about these chart type controls step-by-step. All the charts are in the System.Web.UI.DataVisualization.Charting namespace. Chart data is represented using the following points: X Axis: the horizontal line of the chart termed the X

ASP.NET Chart Drill Down, This example extends the prior pie chart to be an ASP.NET drill down chart, so all of the code and data will be utilizing what had been previously created. Please feel free to start with code from previous blog (Create ASP.NET to know there are several reasons why I would choose the section option. 1. Interview Questions in ASP.NET,C#.NET,SQL Server,.NET Framework Simple login form example in asp.net Check Username and Password availability in database Asp.net insert, Edit, update, delete data in gridview 3 tier architecture example in asp.net with C# Introduction to Object Oriented Programming Concepts (OOPS) in C#.net

Comments
  • Yes, that sounds like the sort of thing I was looking for. How would I do this referencing a specific pie chart segment by name? For example, what code would I use to assign a hyperlink to a segment with a specific name?
  • When posting code, please put 4 spaces in front of the code so that it's easily readable as a code block