This is probably an easy question, but I'm totally new at using TeeChart and I can't for the life of me find the solution.
I have a simple 3D Bar chart with dates on the X-axis (at the bottom), each tick is 1 day. I would like to be able to navigate the starting point of the chart to any given date (ie. the user clicks on a DateNavigator and the chart should then start at that date).
Could anyone please point me in the right direction.
Best Regards,
Tom Reiertsen,
Reiertsen Software Systems.
DateTime on X-Axis (Bottom). How to navigate in code
Hi.
The easiest way do perform an axis scroll is to set it's minimum and/or maximum values. In your case, the following code should show one week of data:
The easiest way do perform an axis scroll is to set it's minimum and/or maximum values. In your case, the following code should show one week of data:
Code: Select all
var sdate,edate: TDate;
begin
sDate := EncodeDate(2004,7,21);
eDate := sDate + 7;
Chart1.Axes.Bottom.SetMinMax(sDate,eDate);
Chart1.Axes.Bottom.Increment := 1.0; // 1day increment
Marjan Slatinek,
http://www.steema.com
http://www.steema.com