Hi,
I've uploaded an file called "BarGraph.bmp". How do I created a stacked bargraph like the one in the bitmap image.
Thanks
Regards,
Casper JH Erasmus
.NET 1.1: Stacked Bar
-
- Newbie
- Posts: 17
- Joined: Wed Oct 13, 2004 4:00 am
- Location: South Africa
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Casper,
The easiest way I can think of to achieve that is making bar's pen not visible and using some code like this:
Is this acceptable for you?
The easiest way I can think of to achieve that is making bar's pen not visible and using some code like this:
Code: Select all
private void Form1_Load(object sender, EventArgs e)
{
tChart1.Aspect.View3D = false;
for (int i = 0; i < 4; i++)
{
Steema.TeeChart.Styles.Bar bar1 = new Steema.TeeChart.Styles.Bar(tChart1.Chart);
bar1.MultiBar = Steema.TeeChart.Styles.MultiBars.Stacked;
bar1.ColorEach = true;
bar1.BarWidthPercent = 100;
bar1.Marks.Visible = false;
bar1.Pen.Visible = false;
}
tChart1[0].Add(1, 1, Color.Red);
tChart1[1].Add(1, 1, Color.Yellow);
tChart1[2].Add(1, 2, Color.Purple);
tChart1[3].Add(1, 1, Color.Turquoise);
tChart1[0].Add(2, 1, Color.Red);
tChart1[1].Add(2, 2, Color.Blue);
tChart1[2].Add(2, 1.5, Color.Lime);
tChart1[3].Add(2, 0.5, Color.Gray);
}
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
-
- Newbie
- Posts: 17
- Joined: Wed Oct 13, 2004 4:00 am
- Location: South Africa