Histogram - placement of bars from tick mark - not centered

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
epidata
Newbie
Newbie
Posts: 10
Joined: Wed Mar 31, 2004 5:00 am
Location: Denmark
Contact:

Histogram - placement of bars from tick mark - not centered

Post by epidata » Wed May 09, 2007 9:05 pm

Is there any way of having bars in a barseries or histogramseries (custom...) to be placed from the tickmark instead of centered around the tickmark.

E.g. data
1 2 3 4 1 2
will show up as four bars placed centered around the values 1 2 3 4

Image

I wished instead the bars to start from 1 2 3 4 and to the right of the number.

regards
Jens Lauritsen[/img]

Marjan
Site Admin
Site Admin
Posts: 745
Joined: Fri Nov 07, 2003 5:00 am
Location: Slovenia
Contact:

Post by Marjan » Thu May 10, 2007 5:45 am

Hi.

I think in this case the easiest solution is to use area series with it's Stairs property set to true:

Code: Select all

area1.Stairs := True;
area1.AddXY(1,10);
area1.AddXY(2,3);
area1.AddXY(3,5);
area1.AddXY(4,7);
area1.AddXY(5,7); // add fake point to show last bin
Marjan Slatinek,
http://www.steema.com

Post Reply