Mark Position in Bottom Axis

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
cristian.bonilla
Newbie
Newbie
Posts: 2
Joined: Tue Aug 31, 2010 12:00 am

Mark Position in Bottom Axis

Post by cristian.bonilla » Tue Sep 14, 2010 5:40 pm

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?

cristian.bonilla
Newbie
Newbie
Posts: 2
Joined: Tue Aug 31, 2010 12:00 am

Re: Mark Position in Bottom Axis

Post by cristian.bonilla » Tue Sep 14, 2010 5:47 pm

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

Yeray
Site Admin
Site Admin
Posts: 9612
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Mark Position in Bottom Axis

Post by Yeray » Wed Sep 15, 2010 3:09 pm

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.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply