BarSeries and mbSelfStack

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
AHa
Newbie
Newbie
Posts: 3
Joined: Fri Apr 23, 2004 4:00 am

BarSeries and mbSelfStack

Post by AHa » Fri Oct 19, 2007 10:00 am

I have a chart with some BarSeries that are displayed with MultiBar:=mbSelfStack.

Is it possible to display the Series-name under each BarSeries-Stack?

I ckecked BottomAxis.LabelStyle, but there is no option for the seriesname.
I also used GetAxisLabel, but it is only called for each SeriesValue.
If I have 5 Bars and each Bar has only 3 Values GetAxisLabel is called only 3 times and I can place the seriesname only under 3 Bars.

Also if the series-count is larger than the value-count of the bars they are overlapped. It can be corrected with BarWidthPercent, but can this calculated correct by default?

Andreas

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 19, 2007 2:11 pm

Hi Andreas,

Could you please send us a simple example project we can run "as-is" to reproduce the problem here and let us know the TeeChart version you are using?

You can either post your files at news://www.steema.net/steema.public.attachments newsgroup or at our upload page.

Thanks in advance.
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

AHa
Newbie
Newbie
Posts: 3
Joined: Fri Apr 23, 2004 4:00 am

Post by AHa » Mon Oct 22, 2007 9:15 am

Hello,
I have uploaded the file "Tee7SelfStack.zip" created with Delphi 7 and TeeChart 7.05.
The problem should be visible at design- and run-time, if the datavalue-count is smaller than the series-count.
The "Series"-Title should be visible on the axis, because I need to display other things in the legend.

Andreas

Pep
Site Admin
Site Admin
Posts: 3277
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Wed Oct 31, 2007 12:38 pm

Hi Andreas,

I think that the best (and easy) way to accomplish would be by using the Custom Axis labels feature, simply use the following code at the end of the FormShow :

Code: Select all

  Chart1.axes.Bottom.items.Clear;
  for i := 0 to Chart1.SeriesCount-1 do
    with Chart1.Axes.Bottom do
      Items.Add(i,'Series' + inttostr(i));
Also if the series-count is larger than the value-count of the bars they are overlapped. It can be corrected with BarWidthPercent, but can this calculated correct by default?
Yes, it's a known problem, for the moment there's not an automatic way to fix it, it must be done as you said by using the BarWidthPercent.

Post Reply