Page 1 of 1

Mark Position in Bottom Axis

Posted: Tue Sep 14, 2010 5:40 pm
by 16457108
Hello.

I want to put the marks on the bottom of each bar, as if they were 'x' values.
I have them with a 90 angle. I want to have a better readability.
I've seen some examples in the forum but they do not have been helpful.

Do you have the exact code?

Re: Mark Position in Bottom Axis

Posted: Tue Sep 14, 2010 5:47 pm
by 16457108
I'm doing that, because a I'm taking data from a dataset and I have seen in this case the X values cannot be of string type.
For example: '04:30'


The graph I want should be like that:


|
|
|
|
|
| #
| # #
| # # #
--------------------------------------------------------------------
00:00 00:15 00:30 ...................................23:45

Re: Mark Position in Bottom Axis

Posted: Wed Sep 15, 2010 3:09 pm
by yeray
Hi cristian,

Are you doing something like following? I can't see anything strange with it.

Code: Select all

uses series, DateUtils;

procedure TForm1.FormCreate(Sender: TObject);
var i: Integer;
    myDate: TDateTime;
begin
  Chart1.View3D:=false;

  with Chart1.AddSeries(TPointSeries) do
  begin
    XValues.DateTime:=true;

    myDate:=StrToDateTime('15/09/2010 00:00');
    for i:= 0 to 10 do
      AddXY(IncMinute(myDate, i*15), random*100);
  end;

  Chart1.Axes.Bottom.LabelsAngle:=90;
  Chart1.Axes.Bottom.Increment:=DateTimeStep[dtFifteenMinutes];
  Chart1.Axes.Bottom.DateTimeFormat:='hh:mm';
end;
If that's not what you are doing, please try to arrange a simple example project we can run as-is to reproduce the problem here.
Thanks in advance.