Page 1 of 1

Axis lables for Box plots

Posted: Wed Oct 20, 2010 11:54 am
by 16556228
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

Re: Axis lables for Box plots

Posted: Wed Oct 20, 2010 3:48 pm
by 10050769
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,

Re: Axis lables for Box plots

Posted: Wed Oct 20, 2010 4:20 pm
by 16556228
Yes - thanks. I have got it working OK now.

Richard