Line Chart, a way to have to Zero line on the Y-axis in <

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
HLEBOEUF
Newbie
Newbie
Posts: 1
Joined: Wed Sep 15, 2004 4:00 am
Location: Belgium
Contact:

Line Chart, a way to have to Zero line on the Y-axis in <

Post by HLEBOEUF » Fri May 27, 2005 8:04 am

Is there a way, in a line-chart with chart-lines-values going between -50 and +50 to have the 0 (zero) line a bit ticker.
Now there are several line on the Y axis (wich is good) but the zero line should (in my case) be easy to see.

Thx

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 May 27, 2005 8:43 am

Hi HLEBOEUF,

Yes, you could do implement how do you want to display the zero label at the GetAxisLabel event doing something like:

Code: Select all

procedure TForm1.Chart1GetAxisLabel(Sender: TChartAxis;
  Series: TChartSeries; ValueIndex: Integer; var LabelText: String);
var
  SpecialLabel: String;
begin
  SpecialLabel:='0';
  if ((StrComp(PChar(LabelText),PChar(SpecialLabel))=0) and
      (Sender=Series1.GetVertAxis)) then
    With Sender.LabelsFont do
    begin
      Style:=[fsBold];
      Size:=10;
      Color:=clRed;
    end
  else
    With Sender.LabelsFont do
    begin
      Style:=[fsItalic];
      Size:=8;
      Color:=clBlack;
    end;
end;
You could also use Custom Labels or a Color Line Tool. For more information on those options please have a look at the TeeChart features demo, available at the TeeChart program group and search for those terms.
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