Page 1 of 1

Pie Charts

Posted: Thu Oct 13, 2011 12:32 pm
by 8123522
Some queries on the attached Pie Charrt:-

On the numbers around the graph, require no box and the font to bigger

How do I force the order, We need the white to be top and then clockwise with the others

Re: Pie Charts

Posted: Fri Oct 14, 2011 9:29 am
by 10050769
Hello MiketheLad,


I suggest you define the position of your values when you add it in the series, as do in next example of code:

Code: Select all

        Steema.TeeChart.Styles.Pie Series1;
        private void InitializeChart()
        {

            Series1 = new Steema.TeeChart.Styles.Pie(tChart1.Chart);
            Series1.Add(74);
            Series1.Add(6);
            Series1.Add(5);
            Series1.Add(8);
            Series1.Add(4);
            Series1.Marks.Style = Steema.TeeChart.Styles.MarksStyles.Percent;
   
        }
Can you tell us if previous code helps you to solve your problem?

Thanks,

Re: Pie Charts

Posted: Fri Oct 14, 2011 1:32 pm
by 8123522
I have treid changing the order, but seem unable to get the white to be at the top, also what about the box and font size of the labels next to the pie




Steema.TeeChart.TChart tChart2 = new Steema.TeeChart.TChart();
Steema.TeeChart.Styles.Pie pie = new Steema.TeeChart.Styles.Pie(tChart2.Chart);
tChart2.Legend.Visible = false;
tChart2.Header.Text = "";
tChart2.Chart.Panel.Color = System.Drawing.Color.White;
tChart2.Chart.Panel.Visible = false;
tChart2.Chart.Walls.Visible = false;
tChart2.Chart.Panel.Bevel.Outer = Steema.TeeChart.Drawing.BevelStyles.None;
tChart2.Chart.Panel.Bevel.Inner = Steema.TeeChart.Drawing.BevelStyles.None;
tChart2.Aspect.View3D = false;

pie.Add(Convert.ToInt32(ethnicperc1), ethnicperc1 + "%", Color.FromArgb(49, 151, 101));
pie.Add(Convert.ToInt32(ethnicperc3), ethnicperc3 + "%", Color.FromArgb(245, 152, 31));
pie.Add(Convert.ToInt32(ethnicperc4), ethnicperc4 + "%", Color.FromArgb(205, 205, 205));
pie.Add(Convert.ToInt32(ethnicperc5), ethnicperc5 + "%", Color.FromArgb(244, 243, 160));
pie.Add(Convert.ToInt32(ethnicperc6), ethnicperc6 + "%", Color.FromArgb(157, 197, 233));
pie.Add(Convert.ToInt32(ethnicperc2), ethnicperc2 + "%", Color.FromArgb(255, 255, 255));

Re: Pie Charts

Posted: Mon Oct 17, 2011 9:37 am
by 10050769
Hello MikeTheLad,

Using last version of TeeChart2011 and next code:

Code: Select all

        private void InitializeChart()
        {
           Steema.TeeChart.Styles.Pie pie = new Steema.TeeChart.Styles.Pie(tChart1.Chart);
           tChart1.Legend.Visible = false;
           tChart1.Header.Text = "";
           pie.Circled = true;
           tChart1.Chart.Panel.Color = System.Drawing.Color.White;
           tChart1.Chart.Panel.Bevel.Outer = Steema.TeeChart.Drawing.BevelStyles.None;
           tChart1.Chart.Panel.Bevel.Inner = Steema.TeeChart.Drawing.BevelStyles.None;

           tChart1.Aspect.View3D = false;
           Random rnd = new Random();
           int ethnicperc1, ethnicperc2, ethnicperc3,ethnicperc4, ethnicperc5, ethnicperc6;
           ethnicperc1 = 74;
           ethnicperc2 = 4;
           ethnicperc3 = 6;
           ethnicperc4 = 2;
           ethnicperc5 = 5;
           ethnicperc6 = 8;
           pie.Add(ethnicperc1, ethnicperc1.ToString() + "%", Color.FromArgb(49, 151, 101));
           pie.Add(ethnicperc3, ethnicperc3.ToString() + "%", Color.FromArgb(245, 152, 31));
           pie.Add(ethnicperc4, ethnicperc4.ToString() + "%", Color.FromArgb(205, 205, 205));
           pie.Add(ethnicperc5, ethnicperc5.ToString() + "%", Color.FromArgb(244, 243, 160));
           pie.Add(ethnicperc6, ethnicperc6.ToString() + "%", Color.FromArgb(157, 197, 233));
           pie.Add(ethnicperc2, ethnicperc2.ToString() + "%", Color.FromArgb(255, 255, 255));
}
I have gotten next results:
pietest2.jpg
pietest2.jpg (38.03 KiB) Viewed 12128 times
Can you try again run previous code and tell us if you can get a good results? On the other hand, If you doesn't use last version of TeeChartFor.Net, please tell us which version are you using now.
On the numbers around the graph, require no box and the font to bigger
Sorry I forgot answer this question. If you want as the boxs of Marks don't appear and font of Marks is to bigger, you need use next properties of Marks to modify their aspect:
  • - Series.Marks.Pen.Visible = False or True;
    - Series.Marks.Color.Transparency= 100. You have indicate the % of transparency you want to marks. And also you can use Series.Marks.Transparent = true; where you indicate as if you want Mark transparent or not.
    - Series.Marks.Font.Size = 12. To Change the size of font.
I have added some of previous properties in your code:

Code: Select all

          ....
           //Marks;
           pie.Marks.Transparent = true;
           pie.Marks.Transparency = 100;
           pie.Marks.Pen.Visible = false;
           pie.Marks.Arrow.Visible = false;
           pie.Marks.Font.Size = 12;
And I have gotten next results:
pieTest1.jpg
pieTest1.jpg (36.17 KiB) Viewed 12116 times
Can you tell us, if previous lines of code works as you expected?

Thanks,

Re: Pie Charts

Posted: Tue Oct 18, 2011 2:26 pm
by 8123522
We need the graph rotating around 90 degress, sample attached of what I am trying to produce

Re: Pie Charts

Posted: Wed Oct 19, 2011 8:16 am
by 10050769
Hello MikeTheLad,

Series have a method that allow rotate the Series. To achieve as you want I recommend rotate your Series an angle of 180ยบ as do in next line of code:

Code: Select all

 pie.Rotate(180);
Can you tell us, if previous line works as you expected?

Thanks,

Re: Pie Charts

Posted: Wed Oct 19, 2011 11:52 am
by 8123522
Thanks, that is what I needed