I am trying to create something like the attached excel pie chart overlay with teecharts, but with each "section" exploded and in 3D.
Does anyone know the code to explode 2 slices of a pie chart, but have them side by side (not exploded from each other). Another option is to be able make a percentage of a slice one color, and the rest of the slice another color. The goal is for either one slice to show 2 pieces of information (invested and uninvested in this example), or for two side by side slices to accomplish the same. Thanks in advance.
group exploded pie chart slices or create 2 color slice
group exploded pie chart slices or create 2 color slice
- Attachments
-
- piepic.JPG (26.5 KiB) Viewed 9297 times
Re: group exploded pie chart slices or create 2 color slice
2 more questions: what is the code to create the outlined border of the pie chart and to only outline the border of every other slice like in the attachment?
Re: group exploded pie chart slices or create 2 color slice
Hi ccc,
I'm afraid that having two slices exploded together it's not possible right now. I'll add this to the wish list to be implemented in future releases. Maybe we should consider adding slice groups. We will study what's the best option to achieve that.
Right now, what you can do is to assign the same color to two slices. Something as follows:
I'm afraid that having two slices exploded together it's not possible right now. I'll add this to the wish list to be implemented in future releases. Maybe we should consider adding slice groups. We will study what's the best option to achieve that.
Right now, what you can do is to assign the same color to two slices. Something as follows:
Code: Select all
private void InitializeChart()
{
tChart1.Aspect.View3D = false;
Steema.TeeChart.Styles.Pie pie1 = new Steema.TeeChart.Styles.Pie(tChart1.Chart);
pie1.Circled = true;
pie1.Add(20,"Cars");
pie1.Add(15, "Bikes");
pie1.Add(5, "Trucks", pie1.ValueColor(1));
pie1.Add(15, "Bycicles");
pie1.Add(35, "Vans");
}
Is that what you are looking for?ccc wrote:what is the code to create the outlined border of the pie chart and to only outline the border of every other slice like in the attachment?
Code: Select all
pie1.Pen.Width = 3;
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: group exploded pie chart slices or create 2 color slice
Thank you Yeray. A couple of follow ups: how do I remove the outline between two slices? Also, how do I make sure the outline goes around the outside if I set the color of a slice to transparent? Thanks.
Re: group exploded pie chart slices or create 2 color slice
In other words, in your example, how would I make the border between cars and bikes transparent?
Re: group exploded pie chart slices or create 2 color slice
Hi ccc,
I'm afraid I can't think on a way to do this right now. The only think is to hide completely the pen:
I've added this in the same ticket as probably adding groups of slices would help to achieve that too (TF02014578).
I'm afraid I can't think on a way to do this right now. The only think is to hide completely the pen:
Code: Select all
pie1.Pen.Visible = false;
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |