How to label the date axis with week numbers.
This example labels the date and time axis with week numbers. For this example, set DateLabelBase to a Sunday, and DateLabelInterval to 7 days. The ISOWeekNumber function can be found in JCLDateTime from the JEDI code library.
procedure TForm1.RACGetDateTimeLabelText( Sender: TObject; DateTime: TDateTime; var DateText, TimeText: string); var WeekNumber: integer; begin TimeText := ''; if DayOfWeek(DateTime) = 1 then begin // label Sundays WeekNumber := ISOWeekNumber(DateTime); DateText := IntToStr(WeekNumber); end else DateText := ''; end;
- Screen Shots
- FAQ & Getting Started
- User Comments
- Support Forum
- Change History
|What People Say|
This is a great component. I've been using it for a year. It's well written, performance is top notch, and the couple of time I've asked for support, I've gotten it right away from the author.