The TssResourceAllocationChart uses four classes to represent various components:

TssResourceAllocationChart

TssResourceAllocationChart represents the whole chart.
AnyObject PropertyPublished TObject
A reference to any TObject that you like. The AnyObject property is provided for the convenience of storing additional information for special needs in an application. If the OwnsAnyObject property is true, the object will be freed when the chart is destroyed.
Bitmap PropertyPublicRead Only TBitmap
The off-screen bitmap containing the chart image.
ChartAppearance PropertyPublished TssResourceAllocationChartAppearance
A member holding properties that control the appearance of the chart.
Count PropertyPublicRead Only integer
The number of resources.
EndAt PropertyPublished TDateTime
The end date/time of the chart.
FindAvailableResources FunctionPublic (StartDateTime, EndDateTime: TDateTime; List: TList): integer;
Populates a list with resources that have availability for the specified period.
FindAvailableSlot FunctionPublic function FindAvailableSlot(RequiredResources: TList; StartDate, EndDate, StartTime, EndTime, TimeIncrement, Duration: TDateTime): TDateTime;

function FindAvailableSlot(RequiredResources: TList; StartDate, EndDate, StartTime, EndTime, TimeIncrement, Duration: TDateTime; Days: TssDays): TDateTime;
Finds a datetime when all the listed resources are available. Searches between the start and end dates specified, for availability between the start and end times specified.
FindNearestSlot FunctionPublic (point: TPoint): TssResourceAllocation
Finds the allocation nearest to the specified position. Returns nil if there are no allocations..
FindSlot FunctionPublic (point: TPoint): TssResourceAllocation
Finds the allocation displayed at the specified position. Returns nil if none.
FirstDisplayedIndex PropertyPublic integer
The index of the top-most resource currently being displayed, or -1 if the chart has no resources. This property can be set to scroll the display.
FirstDisplayedResource PropertyPublic TssResource
The top-most resource currently being displayed, or nil if the chart has no resources. This property can be set to scroll the display.
HintStyle PropertyPublished TssDateTimeStyle
The style of any automatically generated hints. Defaults to dtDateAndTime.
LastDisplayedIndex PropertyPublic integer
The index of the bottom-most resource currently being displayed, or -1 if the chart has no resources. This property can be set to scroll the display.
LastDisplayedResource PropertyPublic TssResource
The bottom-most resource currently being displayed, or nil if the chart has no resources. This property can be set to scroll the display.
MinimumDrag PropertyPublished integer
The minimum drag, in pixels, that is recognised. Any drag less than this is ignored.
NumDisplayedResources PropertyPublicRead Only integer
The number of resources currently being displayed.
Options PropertyPublished TssResourceAllocationChartOptions
Various options that control some aspects of the charts bahaviour.
OwnsAnyObject PropertyPublished boolean
Whether the object referenced by the AnyObject property is owned by this chart. If the object is owned, it is freed when the chart is destroyed.
PlotRect PropertyPublicRead Only TRect
The area of the plot.
RefreshBitmap ProcedurePublic TColor
Causes the bitmap to be redrawn. This can be useful if the bitmap contains some time-dependant element added in an owner-draw routine.
Resources PropertyPublicRead Only [indx: integer]: TssResource
An array of the resources.
RoundTo PropertyPublished double
When dragging or stretching allocations, the new start and/or end date/time are rounded to this interval.
SelectAllocationCount Property integer
The number of selected allocations.
SelectAllocations Property [indx: integer]: TssResourceAllocation
A list if the selected allocations. To select an allocation, set its Selected property.
SizingHandleWidth PropertyPublished integer
The size of the invisible sizing handle area at the end of each allocation. If the user starts to drag while over this sizing handle, then the allocation is expanded or contracted instead of moved.
StartAt PropertyPublished TDateTime
The start date/time of the chart.
Sort ProcedurePublic
Sorts the resources into alphabetical order.
Sort ProcedurePublic (CompareFunction: TssResourceCompareFunction)
Sorts the resources. The user-specified compare function can use any properties of the resources to determine their order.
VerticalPageSize PropertyPublicRead Only integer
The number of resources that will fit onto the display using the current configuration.
OnAdjustDragRectEvent PropertyPublished TAdjustDragRectEvent
An event that allows the allocation drag or stretch rects to be adjusted. This would only be necessary if you were using owner-draw allocations and the default rect was not appropriate.
OnAdjustPlotRectEvent PropertyPublished TssAdjustPlotRectEvent
An event that allows the plot rectangle to be adjusted. This could be to allow more room for owner-draw date labels or resource names etc.
OnAfterPaint PropertyPublished TNotifyEvent
An event invoked after the bitmap has been painted to the canvas.
OnAllocationAutoHint PropertyPublished TssAllocationAutoHintEvent
An event invoked before an automatically generated allocation hint is shown. The hint string may be modified by the event handler.
OnAllocationclick PropertyPublished TssAllocationEvent
An event invoked when an allocation is clicked.
OnAllocationDblClick PropertyPublished TssAllocationEvent
An event invoked when an allocation is double-clicked.
OnAllocationDrag PropertyPublished TssAllocationDragEvent
An event invoked when an allocation is dragged. The StartDateTime and EndDateTime arguments may be adjusted to limit the extent of the drag.
OnAllocationDragCancel PropertyPublished TssAllocationEvent
An event invoked when an allocation is dragged then dropped in its original location.
OnAllocationDragEnd PropertyPublished TssAllocationEvent
An event invoked when an allocation is dragged then dropped in a new location.
OnAllocationDragEndQuery PropertyPublished TssAllocationDragQueryEvent
An event invoked when an allocation is dragged then dropped in a new location, but before the change is made. It gives a last chance to cancel the operation.
OnAllocationDragOverResource PropertyPublished TssAllocationDragOverResourceEvent
An event invoked when an allocation from one resource is dragged over another resource. The StartDateTime and EndDateTime arguments can be altered to limit the drag extent, or the Allow argument can be set to false to prevent the drag operation. Note: the OnAllocationSwitchResource event is signalled if the allocation is dropped onto the resource.
OnAllocationDragStart PropertyPublished TssAllocationDragStartEvent
An event invoked when an allocation is first dragged.
OnAllocationDraw PropertyPublished TssAllocationDrawEvent
An event invoked before an allocation is drawn. It allows the allocation to be drawn with specific colours.
OnAllocationRightClick PropertyPublished TssAllocationEvent
An event invoked when an allocation is right-clicked.
OnAllocationSelectionChange PropertyPublished TssAllocationEvent
An event invoked when the selected property of an allocation is changed.
OnAllocationStretch PropertyPublished TssAllocationDragEvent
An event invoked when an allocation is dragged. The StartTime and EndTime arguments may be adjusted to limit the extent of the stretch.
OnAllocationStretchCancel PropertyPublished TssAllocationEvent
An event invoked when an allocation is stretched, but the stretch is then cancelled.
OnAllocationStretchEnd PropertyPublished TssAllocationEvent
An event invoked when an allocation is stretched, after the change has been made.
OnAllocationStretchEndQuery PropertyPublished TssAllocationDragQueryEvent
An event invoked when an allocation is stretched, but before the change has been made. It gives a last chance to cancel the operation.
OnAllocationStretchStart PropertyPublished TssAllocationDragQueryEvent
An event invoked when an allocation is first stretched.
OnAllocationSwitchResource PropertyPublished TssAllocationSwitchResourceEvent
An event invoked when an allocation is dropped onto a different resource.
OnAllocationSwitchResourceQuery PropertyPublished TssAllocationSwitchResourceQueryEvent
An event invoked when an allocation is dropped onto a different resource, but before the change is made. It gives a last chance to cancel the operation.
OnBeforePaint PropertyPublished TNotifyEvent
An event invoked before the bitmap has been painted to the canvas.
OnChange PropertyPublished TNotifyEvent
An event invoked when the chart has changed.
OnDateRangeChange PropertyPublished TNotifyEvent
An event invoked when the chart start and/or end date/time has changed.
OnDragPlot PropertyPublished TssDragPlotEvent
An event invoked when the chart is dragged. The StartTime and EndTime arguments may be adjusted to limit the extent of the drag.
OnDragPlotEnd PropertyPublished TNotifyEvent
An event invoked when the chart dragging ends.
OnDragPlotStart PropertyPublished TssDragPlotStartEvent
An event invoked when the chart dragging starts.
OnDrawDateLabel PropertyPublished TssGetDateTimeEvent
If this event is set, then the DateLabelBase and DateLabelInterval properties are not used. Instead, this event handler is called to return the date/time of each label. It is called repeatedly until it returns a date/time that is outside the chart range (such as 0.0) This event is most useful when the date labels are required to be at a non-regular interval, such as on the first day of each month.
OnDrawDateLine PropertyPublished TssGetDateTimeEvent
If this event is set, then the DateLineBase and DateLineInterval properties are not used. Instead, this event handler is called to return the date/time of each label. It is called repeatedly until it returns a date/time that is outside the chart range (such as 0.0) This event is most useful when the date lines are required to be at a non-regular interval, such as on the first day of each month.
OnDrawProgress PropertyPublished TssDrawProgressEvent
An event invoked several times during the drawing process. It allows custom graphics to be added at different stages in the drawing process. For example, to add graphics behind the allocations, but on top of the background.
OnDrawResourceName PropertyPublished TssDrawResourceNameEvent
An event invoked before the name of the resource is displayed. This event allows you to control the colour of the text.
OnGetDateTimeLabelText PropertyPublished TGetDateTimeLableEvent
Allows bespoke date and time labels.
OnGetPlotBackground PropertyPublished TssGetPlotBackgroundEvent
This event to allows the irregular colouring of the plot background. For example, to allow weekends to be in a different colour.
OnResourceNameClick PropertyPublished TssResourceEvent
An event invoked when a resource name is clicked.
OnResourceNameDblClick PropertyPublished TssResourceEvent
An event invoked when a resource name is double-clicked.
OnResourceNameAutoHint PropertyPublished TssResourceNameAutoHintEvent
An event invoked when the mouse is over a resource name. The Hint argument must be set to cause a hint to appear.
OnResourceNameRightClick PropertyPublished TssResourceEvent
An event invoked when a resource name is right-clicked.
OnRightClick PropertyPublished TNotifyEvent
An event invoked when the chart is right-clicked.
OnOwnerDrawAllocation PropertyPublished TssAllocationOwnerDrawEvent
An event invoked to draw an allocation bar when the racOwnerDrawAllocations option is set.
OnOwnerDrawDateLabel PropertyPublished TssOwnerDrawDateLabelEvent
An event invoked to draw a date label when the racOwnerDrawDateLabels option is set.
OnOwnerDrawResourceName PropertyPublished TssOwnerDrawResourceNameEvent
An event invoked to draw a resource name when the racOwnerDrawResourceNames option is set.
OnPlotRectChange PropertyPublished TNotifyEvent
An event invoked when the size or location of the plot area changes.
OnVerticalScroll PropertyPublished TNotifyEvent
An event that is fired when the chart is scrolled vertically.
AddResource FunctionPublic (ResourceName: string; Color: TColor = clBtnFace; Style: TssResourceDisplayStyle = rsLineArrow): TssResource
This function creates a new resource and adds it to the chart. It returns a reference to the newly created resource.
BeginUpdate ProcedurePublic ()
Starts buffering updates. One call to EndUpdate should be called for each call to BeginUpdate.
Clear ProcedurePublic ()
Deletes all resources and allocations.
DateTimeToX FunctionPublic (dt: TDateTime): integer
Converts a TDateTime to a chart x-coordinate.
DeselectAllAllocations ProcedurePublic ()
Deselects all selected allocations.
EndUpdate ProcedurePublic ()
Stops buffering updates. One call to EndUpdate should be called for each call to BeginUpdate.
ExchangeResources ProcedurePublic (Resource1, Resource2: TssResource)

or

(ResourceIndex1, ResourceIndex2: integer)
Exchanges two resources so that they swap position in the chart.
FindResource FunctionPublic FindResource(aResourceName: string; CaseSensitive: boolean = false): TssResource
Returns the resource with the specified name, or nil if there is no resource.
FindResourceFromY FunctionPublic (Y: integer; Strict: boolean = true): TssResource
Returns the resource displayed at a specified Y position, or nil if there is no resource. If Strict is false, then it will return the nearest resource.
IndexOf FunctionPublic (Resource: TssResource): integer
Returns the index of a particular resource, or -1 if the resource is not found.
InsertResource FunctionPublic (Place: integer; ResourceName: string; Color: TColor = clBtnFace; Style: TssResourceDisplayStyle = rsLineArrow): TssResource
This function creates a resource and inserts it into the chart at a specific index. It returns a reference to the newly created resource.
Invalidate ProcedurePublic ()
Invalidates the chart area causing a re-paint.
PaintTo FunctionPublic (Canvas: TCanvas; Rct: TRect; TopIndex: integer): integer
FunctionPublic (Canvas: TCanvas; Rct: TRect; TopIndex: integer; Appearance: TssResourceAllocationChartAppearance): integer;
Draws the chart to the specified rectangle on the specified canvas. Optionally, using the specified appearance instance. Returns the index of the last resource displayed.
ScrollChart ProcedurePublic (Increment: TDateTime)
Scrolls the chart by the specified amount. Use negative increments to scroll to an earlier date/time range.
SetDateTime ProcedurePublic (StartAt, EndAt: TDateTime)
Sets the StartAt and EndAt properties in a single operation.
SortAllocations FunctionPublic ()
Sorts the allocations into increasing date/time order for all resources.
XToDateTime FunctionPublic (x: integer): TDateTime
Converts a chart x-coordinate to the corresponding date/time.

In addition, the following published properties are inherited from TCustomPanel.

Align Anchors BevelInner BevelOuter BevelWidth
BorderStyle BorderWidth Constraints Ctl3D DragCursor
DragKind DragMode Hint ParentCtl3D ParentShowHint
PopupMenu ShowHint OnCanResize OnClick OnConstrainedResize
OnDblClick OnDockDrop OnDockOver OnDragDrop OnDragOver
OnEndDock OnEndDrag OnEnter OnExit OnGetSiteInfo
OnMouseDown OnMouseMove OnMouseUp OnMouseWheel OnMouseWheelDown
OnMouseWheelUp OnResize OnStartDock OnStartDrag OnUnDock
What People Say

Thanks for the component. It's quite amazing, powerful and unique.
Raymond Kennington, Programming Solutions (see the full quote)
More …

No malware No spam
McAfee Site Report
Web of Trust