Bar and HorizBar: join bars + display date

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
yves bourgeois
Newbie
Newbie
Posts: 29
Joined: Wed Mar 05, 2008 12:00 am

Bar and HorizBar: join bars + display date

Post by yves bourgeois » Thu Apr 24, 2008 4:26 pm

Hi, Narcis.

Today, I've been playing around with the bar and horizbar, and I have stumbled on the following problems I can't seem to get right. I have created a small test project which I uploaded on your upload webpage, called 'BarchartTest.rar' (the project name itself is a bit different, but it's the correct one).

On the bar chart, I want to display a certain number of selfstacked bars, which are joined together. I am able to do this, except that on the horizontal axis, I don't get the x-values that I give in the add-method of the barserie, they just start to count from 0. Is there an option I have overlooked to display the actual x-values?

On the horizchart, I want to display datetime values on the vertical axis, and I also want the bars to be joined together. When I use the selfstack option, I can join the two bars together nicely, but the date on the vertical axis is all wrong (starting at 1899) (for this, I use barHeightPercent = 50, as I have two bars: 100% / 2).
When I use the stacked option, with barHeightPercent = 100, the datetime is now displayed correctly, but the bars are not. Using 99 does make the bars render like they should, but the result is not entirely what I want.

Could you tell me what I am doing wrong here? Is this behavious as designed?

With kind regards

Yves Bourgeois

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Fri Apr 25, 2008 8:09 am

Hi Yves,

Thanks for the example project. When using self stacked bars, either vertical or horizontal, the x values doesn't have much meaning except for the order they will be stacked in. What would you expect to be displayed in the horizontal axis with Bar series and in the vertical axis with HorizBar series? You may be interested in checking the custom labels feature in the features demo, available at TeeChart's program group. The example can be found at All Features\Welcome !\Axes\Labels\Custom labels. You could try adding custom labels at zero, that way you'll be able to display whatever you want.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply