Hi,
I would like to know how to create bar series and group them according to year but without stacking. I tried the Multibar property to side but it display's differently. Also is there a way to prevent the chart from using all the available space (scale based on the charts width). Please see attachment for the chart i want to accomplish.
Many Thanks
How to group bar without stacking
How to group bar without stacking
- Attachments
-
- barseries.JPG (21.69 KiB) Viewed 3170 times
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: How to group bar without stacking
Hi iEnergy,
Yes, you can do that as shown in the code snippet below. Setting BarWidthPercent to 100 seems to work wrongly though, I've added the issue (TF02015176) to the defect list to be fixed.
Yes, you can do that as shown in the code snippet below. Setting BarWidthPercent to 100 seems to work wrongly though, I've added the issue (TF02015176) to the defect list to be fixed.
Code: Select all
public Form1()
{
InitializeComponent();
InitializeChart();
}
private void InitializeChart()
{
tChart1.Aspect.View3D = false;
Random y = new Random();
for (int i = 0; i < 3; i++)
{
Steema.TeeChart.Styles.Bar bar = new Steema.TeeChart.Styles.Bar(tChart1.Chart);
bar.MultiBar = Steema.TeeChart.Styles.MultiBars.Side;
bar.Marks.Visible = false;
bar.BarWidthPercent = 99;
for (int j = 0; j < 3; j++)
{
bar.Add(2010 + j, y.Next());
}
}
}
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 |