bar chart / bar width

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Jennifer
Newbie
Newbie
Posts: 20
Joined: Tue Dec 07, 2004 5:00 am

bar chart / bar width

Post by Jennifer » Thu Oct 27, 2005 7:00 pm

how do we set the width of the bars in a bar chart?
Than ks,

Jennifer

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 Oct 28, 2005 9:48 am

Hi Jennifer,

Use:

Code: Select all

Series2.BarWidthPercent:=30;
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

Jennifer
Newbie
Newbie
Posts: 20
Joined: Tue Dec 07, 2004 5:00 am

bar width

Post by Jennifer » Sun Oct 30, 2005 7:41 pm

This does not appear to set the bar width the way we want, but
setting histseries.custombarwidth:=x comes closer. what we cannot find is the units for the custombarwidth. For exzmple, if we
have 10 bars and want to show them spread out across
min,max for the series, how do we set this so the bars would span
the chart showing 10 bars and 50% bar width.?

Thanks,
Jen

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

Post by Narcís » Wed Nov 02, 2005 9:18 am

Hi Jen,

CustomBarWidth units are pixels.

I'm afraid I don't understand exactly what you are trying to get but for what I understand, I'd say just setting BarWidthPercent to 50 is enough as this is default's behaviour.

If you wished to calculate some custom pixel ratio you could use CustomBarWidth and get axis width in pixels using Chart1.Axes.Bottom.IAxisSize.

If my answer doesn't help you could you please be more specific or send us an image so that we can figure out your needs? You can post your files at [url]news://www.steema.net/steema.public.attachments[/url] newsgroup.
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