Click here to Skip to main content
15,912,977 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
how can we create pie chart with tooltips.means pie chart with the details.plz tell me
Posted

Have a look at various charting options available in ASP.Net as listed here[^].
A built in set of controls is available as well[^].
 
Share this answer
 
Hello...

Charting in Asp.net is easy with MSChart.exe by microsoft.

You can find various charts in this MSChart.exe

Click Here to download the MSChart.exe

It's easy to use.

For Pie chart
Chart1.ChartAreas.Add("PieChartArea");
        Chart1.ChartAreas["PieChartArea"].Area3DStyle.Enable3D = true;

        Chart1.Series.Add("VotesSeries");
        Chart1.Series["VotesSeries"].ChartType = SeriesChartType.Pie;
        Chart1.Series["VotesSeries"]["PieLabelInside"] = "Inside";
        string[] xValue = new string[dt.Rows.Count];
        Int32[] yValue = new Int32[dt.Rows.Count];
        for (int i = 0; i < dt.Rows.Count; i++)
        {
            //Chart1.Series["VotesSeries"].Points.DataBindXY(dt.Rows[i][0].ToString(),dt.Rows[i][1].ToString());
            xValue[i] = dt.Rows[i][0].ToString();
            yValue[i] = Convert.ToInt32(dt.Rows[i][1].ToString());
        }
        Chart1.Series["VotesSeries"].Points.DataBindXY(xValue, yValue);
        Chart1.Series["VotesSeries"].IsVisibleInLegend = true;


Thanks
 
Share this answer
 
v2
Comments
Member 8387468 5-Dec-11 5:25am    
ok sir i m using this but in it i want to do the work on the event of pie chart means on every part of the pie chart how it can possible to do?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900