Hi,
I have just upgraded teechart from a 2 years old version, and it is shown different for bar series.
I attached two charts, one is how it was seen in the previous version, and the other with the bars over other bars.
How can I configurate the distance between bars?
Thanks
Space between bar series
-
- Newbie
- Posts: 6
- Joined: Fri Feb 19, 2016 12:00 am
Space between bar series
- Attachments
-
- Now.png (79.19 KiB) Viewed 8076 times
-
- previous.png (73.08 KiB) Viewed 8069 times
-
- Guru
- Posts: 1603
- Joined: Fri Nov 15, 2002 12:00 am
Re: Space between bar series
Hello,
Thank you.
Would you be so kind as to post here a "Short, Self Contained, Correct (Compilable), Example" of the code used to generate the images and also the two version numbers of TeeChart.dll in which the difference can be seen?wakewakeup wrote: I have just upgraded teechart from a 2 years old version, and it is shown different for bar series.
I attached two charts, one is how it was seen in the previous version, and the other with the bars over other bars.
How can I configurate the distance between bars?
Thank you.
Best Regards,
Christopher Ireland / 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: 6
- Joined: Fri Feb 19, 2016 12:00 am
Re: Space between bar series
Please find attached the example.
You can change the variable numberofvalues from 2 to 3 and see how if you have 3 values it is show with spaces and with 2 they are one over other. I would like to be always like the 3 values example.
Thanks
You can change the variable numberofvalues from 2 to 3 and see how if you have 3 values it is show with spaces and with 2 they are one over other. I would like to be always like the 3 values example.
Thanks
- Attachments
-
- 3values.png (9.38 KiB) Viewed 8037 times
-
- 2values.png (8.43 KiB) Viewed 8038 times
-
- TestTeechart.zip
- (16.9 KiB) Downloaded 667 times
-
- Guru
- Posts: 1603
- Joined: Fri Nov 15, 2002 12:00 am
Re: Space between bar series
Thank you for your example.
I think you should be able to use the BarWidthPercent property to change this behaviour, e.g.
I think you should be able to use the BarWidthPercent property to change this behaviour, e.g.
Code: Select all
int numberofvalues = 2;
for (int i = 0; i < numberofvalues; i++)
{
Steema.TeeChart.Styles.Bar barra = new Steema.TeeChart.Styles.Bar(chart.Chart);
barra.BarWidthPercent = 60;
for (int j = 0; j < numberofvalues; j++)
{
barra.Labels[j] = "Label " + j.ToString();
barra.Add(j, j * 10 + 1);
}
}
Best Regards,
Christopher Ireland / 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 |