Axis lables for Box plots

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Richard
Newbie
Newbie
Posts: 7
Joined: Tue May 25, 2010 12:00 am

Axis lables for Box plots

Post by Richard » Wed Oct 20, 2010 11:54 am

Hi

I have 12 box plots (Months- ie - Jan to Dec) - how do I get the bottom axis to show the month name, I guess I am missing something, but I am struggling to find it!

Thanks Richard

Sandra
Site Admin
Site Admin
Posts: 3132
Joined: Fri Nov 07, 2008 12:00 am

Re: Axis lables for Box plots

Post by Sandra » Wed Oct 20, 2010 3:48 pm

Hello Richard,

I recommend you use custom labels, assign to for each series its label. You can do something similar as next code:

Code: Select all

procedure TForm1.FormCreate(Sender: TObject);
var i: Integer;
begin
  Chart1.View3D:=false;
  Chart1.Axes.Bottom.Items.Clear;
  for i:=0 to 11 do
  begin
    with Chart1.AddSeries(TBoxSeries) as TBoxSeries do
    begin
      FillSampleValues();
      Position:=i;
      Title:='Month ' + IntToStr(i);
      Chart1.Axes.Bottom.Items.Add(Position, Title);
    end;
  end;
  Chart1.Axes.Bottom.LabelsAngle:= 90;
end;
Could you please, tell us if previous code works as you want?

I hope will helps.

Thanks,
Best Regards,
Sandra Pazos / 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

Richard
Newbie
Newbie
Posts: 7
Joined: Tue May 25, 2010 12:00 am

Re: Axis lables for Box plots

Post by Richard » Wed Oct 20, 2010 4:20 pm

Yes - thanks. I have got it working OK now.

Richard

Post Reply