Page 1 of 1

Series names in bar charts

Posted: Thu Jun 09, 2005 6:29 am
by 5890529
We’re currently using TeeChart 5.02 (for Delphi 6) and we have some problem with long series names in bars chart.

When ever the chart form is large enough the names are written below the bottom axis, even if it makes the graph very small. In other cases the titles are written above the bars, and can’t be clearly read.

We tried changing the Chart's BottomAxis.LabelMultiLines property to true (both through the code and the run time properties form) but we didn’t see any change.

Does this property (LabelsMultiLines) work? Do you have any other idea we can solve our problem with?

I have some screenshots that demonstrate this problem, but I didn't find a way to atached them to this post.

Thanks,
Michal Maor,
Mercury.[/img]

Posted: Thu Jun 09, 2005 1:08 pm
by narcis
Hi Michal,

Yes, you are right. It seems not being working. However you can use TeeSplitInLines method at OnGetAxisLabel method as shown here:

Code: Select all

procedure TForm1.Chart1GetAxisLabel(Sender: TChartAxis;
  Series: TChartSeries; ValueIndex: Integer; var LabelText: String);
begin
        TeeSplitInLines(LabelText,' ');
end;
In the example it will split lines when there's a blank space.