O'Reilly logo

Graphics Programming with GDI+ by Mahesh Chand

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

12.6. Drawing a Pie Chart

Do you remember the pie chart application from Chapter 3 (see Figure 3.43)? Now let’s write a similar application using ASP.NET. We will provide both fill and draw options.

We create a Web Forms application using Visual Studio .NET. We add some text and two buttons to the page. The final Web page looks like Figure 12.16. The Draw Chart button will draw a pie chart, and the Fill Chart button will fill the chart with different colors.

Figure 12.16. A pie chart–drawing application in ASP.NET

Now we add some variables (see Listing 12.10). Instead of reading values from the user, we use hard-coded values for the valArray ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required