IconImage |
SetAlign() __construct() |
The icons are then used exactly as you would use text strings when specifying a title for the gantt object. For example:
$icon = new IconImage(GICON_WARNING,0.7);
$titles = array($icon,'65 days','3 Aug','5 sep');
$bar = new GanttBar(0,$titles,$startdat,$enddate);
...
Hint: When using icons togehter with titles the height of each bar is not affected (by design!) of the icons height. If you are using icons in several rows it might therefore be usefull to increase the vertical margin factor between each row. This is done by a call to the method GanttGarph::SetVMarginFactor()
Specify anchor point for icon
Argument | Default | Description |
---|---|---|
$aX | 'left' | Horizontal anchor point |
$aY | 'center' | Vertical anchor point |
Example:
Create a new icon for use in Gantt title columns
Argument | Default | Description |
---|---|---|
$aIcon | Icon specification. Either an image file or one of the builtin icons | |
$aScale | 1 | Scale of icon |
An icon can either be created from an arbitrary image file (type is determined by the file extension) or it can also be one of the builtin icons. The builtin icons are:
A graphic illustration of the differenmt icons can be found in the manual.
The second argument specifies an optional scaling factor for the image/builtin icon.
The icons are then used exactly as you would use text strings when specifying a title for the gantt object. For example:
$icon = new IconImage(GICON_WARNING,0.7);
$titles = array($icon,'65 days','3 Aug','5 sep');
$bar = new GanttBar(0,$titles,$startdat,$enddate);
...
Hint: When using icons togehter with titles the height of each bar is not affected (by design!) of the icons height. If you are using icons in several rows it might therefore be usefull to increase the vertical margin factor between each row. This is done by a call to the method GanttGarph::SetVMarginFactor()
Example: