|Declaration:||property BackGroundImg: TBakGndImg; |
The property BackGroundImg specifies the chart background image and its associated options. The background image may be either an image or a colored rectangular region. The image has to be an uncompressed (Windows) BMP file of any color depth and size. The background image is loaded at run-time from the disk. If Rchart does not find a background image at the specified location, no background image at all is displayed.
Please note, that while a background image may significantly enhance the appeal of a chart, it also slows down the display process. Thus it is not recommended to use background images for animated charts.
The following subproperties define the properties of the background image and are available within the object inspector. Please note that part of these properties can be edited by using the property editor which comes up when clicking at the ellipses of the BackGroundImg property.
property Name: string;
property IncludePath: boolean;
property FillMode: TBkgFill;
property AreaMode: TBgAreaMode;
property AreaColor: TColor;
property AreaLeft: double;
property AreaRight: double;
property AreaTop: double;
property AreaBottom: double;
||The Name property contains the name of the background file. Note that the name property can be stripped off the path information by setting the property IncludePath to FALSE. If a file name is manually entered which does not exist, the Name property is automatically cleared. In the case the Name property is empty, a colored rectangular region can be used instead of the background image (see AreaMode below).|
||Under most circumstances it is advantageous to use only the file name of the background image without any path information. Set the property IncludePath to TRUE if you want to include the path of background file.|
||The property FillMode defines the mode of the background fill. Three different fill modes are available: bfSimple, bfStretch, bfTile. See the TBkgFill description for details.
||In some cases it is useful to have a certain part of the chart colored by a different background color. While the principal background color is controlled by the property ChartColor, parts of the background can be drawn in a different color specified by the subproperty AreaColor. The extents of the colored area are controlled by the subproperties AreaLeft, AreaRight, AreaTop, and AreaBottom. All extents are real-world coordinates in the coordinate system of the currently active layer (see Scale1X and Scale1Y).
AreaMode may be set to the following values:
Note: In order to implement more complicated background colorings you may use the event OnBeforeRenderData.
||no background area is displayed
||the entire area left to the x-value specified by AreaLeft is colored.
||the entire area right to the x-value specified by AreaRight is colored.
||the entire area above the y-value specified by AreaTop is colored.
||the entire area below the y-value specified by AreaBottom is colored.
||The vertical stripe bounded by AreaLeft and AreaRight is colored.
||The region outside the vertical stripe bounded by AreaLeft and AreaRight is colored.
||The horizontal stripe bounded by AreaTop and AreaBottom is colored.
||The region outside the horizontal stripe bounded by AreaTop and AreaBottom is colored.
||The rectangular region specifed by AreaLeft, AreaRight, AreaTop and AreaBottom is colored.
||The region outside the rectangular region specifed by AreaLeft, AreaRight, AreaTop and AreaBottom is colored.
||The color of the rectangular background area.
||The left border of the rectangular background region (in units of the coordinate system of the currently active layer).
||The right border of the rectangular background region (in units of the coordinate system of currently active layer).
||The top border of the rectangular background region (in units of the coordinate system of currently active layer).
||The bottom border of the rectangular background region (in units of the coordinate system of currently active layer).