Page 1 of 1

Bar and HorizBar: join bars + display date

Posted: Thu Apr 24, 2008 4:26 pm
by 14048505
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

Posted: Fri Apr 25, 2008 8:09 am
by narcis
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.