Hi,
I would like to change the increment step on X Axis
that has every single day from 2019 year.
Hence, the X axis has a Date Format & I would like
to have an one month step for each Bar on graph.
Thank you
Vasilis
Change the increment step on X Date Axis
Re: Change the increment step on X Date Axis
Hello Vasilis,
You could set the
You could set the
Increment
to DateTimeStep[dtOneMonth]
. Ie:Code: Select all
uses Series;
procedure TForm1.FormCreate(Sender: TObject);
var i: Integer;
d: TDateTime;
begin
Chart1.View3D:=False;
Chart1.Gradient.Visible:=False;
Chart1.Color:=clWhite;
Chart1.Walls.Back.Gradient.Visible:=False;
Chart1.Walls.Back.Color:=clWhite;
Chart1.Legend.Hide;
with TBarSeries(Chart1.AddSeries(TBarSeries)) do
begin
Marks.Hide;
XValues.DateTime:=True;
d:=EncodeDate(2019, 1, 1);
AddXY(d, 100+random*10);
for i:=1 to 30*6 do
begin
AddXY(d, YValue[i-1]+random*10-5);
d:=d+1;
end;
end;
Chart1.Axes.Bottom.Increment:=DateTimeStep[dtOneMonth];
end;
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |