Pie Chart builder made by winform

Source: Internet
Author: User

In the course of data warehouse and data mining today, the teacher is always proposing bar charts, pie charts, and so on,

We also told us to come back and draw a few more. Alas, it's annoying,

Come back in the evening and have a whimsy. Why don't I write a pie chart generator by myself,

Haha, just do it, so we have the following pie chart generator.

This generator is actually very simple, that is, the use of a simple knowledge of GDI +,

What about the pie chart generator,

Mainly to complete the following functions, through a group of user input data,

Each group of data should have a corresponding variable name, variable value, and a color that must be selected by the user,

Of course, the variable names and colors cannot be repeated.

Then, we use GDI + for drawing. What about drawing,

That's easy. I instantiate a bitmap and use this bitmap to generate a graphics,

In this way, you can easily draw a picture,

You can put this bitmap in a picturebox and it will be OK,

Because the examples are relatively simple, I will not introduce them more,

Here are a few screenshots.

The user can store a group of input data in a list generic set.

  1. The color and variable names cannot be repeated in the list set.

Click "generate pie chart" to view the pie chart.

The above is an image, and the following is a dview control.

Still adhering to the consistent principle, if you do not, you can leave your mailbox,

I will send you the source code to learn !!!

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.