3d - Pie Chart [Transparent]

10:19 PM
3d- Pie chart Control for .net Framework

This one is not Made By me.
Reference: http://www.codeproject.com/KB/graphics/julijanpiechart.aspx

Dll:  You can Download The Control Dll from above website.

Now for the Coding :

Simply add the dll to your project through : ToolBox -> Choose items > Your Dll
You will see a  Pie chart Control in your Tool box of the Visual Studio

Drag and drop it to a form.

Write the following code on Form's Load event.

private void Form1_Load(object sender, EventArgs e)
        {
            pcc1.Values = new decimal[] { 10, 15, 5, 35 };
            int alpha = 80;
            pcc1.Colors = new Color[] { Color.FromArgb(alpha, Color.Red), 
                                    Color.FromArgb(alpha, Color.Green), 
                                    Color.FromArgb(alpha, Color.Yellow), 
                                    Color.FromArgb(alpha, Color.Blue) };

            pcc1.SliceRelativeDisplacements = new float[] { 0.1F, 0.2F, 0.2F, 0.2F };

            pcc1.Texts = new string[] { "red", 
                                    "green", 
                                    "blue", 
                                    "yellow" };

            pcc1.ToolTips = new string[] { "Peter", 
                                       "Paul", 
                                       "Mary", 
                                       "Brian" };

            pcc1.Font = new Font("Arial", 10F);
            pcc1.ForeColor = SystemColors.WindowText;
            pcc1.LeftMargin = 10F;
            pcc1.RightMargin = 10F;
            pcc1.TopMargin = 10F;
            pcc1.BottomMargin = 10F;
            pcc1.SliceRelativeHeight = 0.25F;
            pcc1.InitialAngle = -90F;
            
        }

This is just a Demo of how the Control works
pcc1 is the Pie chart Control's Name

Complete Project: 3d -Pie Chart

0 comments:

Post a Comment