The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....



BackGroundImg


Unit: SDL_rchart
Class: TRChart
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;

Name 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).
IncludePath 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.
FillMode 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.
AreaMode 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:
  bamNone no background area is displayed
  bamLeft the entire area left to the x-value specified by AreaLeft is colored.
  bamRight the entire area right to the x-value specified by AreaRight is colored.
  bamTop the entire area above the y-value specified by AreaTop is colored.
  bamBottom the entire area below the y-value specified by AreaBottom is colored.
  bamVStripe The vertical stripe bounded by AreaLeft and AreaRight is colored.
  bamVStripeInv The region outside the vertical stripe bounded by AreaLeft and AreaRight is colored.
  bamHStripe The horizontal stripe bounded by AreaTop and AreaBottom is colored.
  bamHStripeInv The region outside the horizontal stripe bounded by AreaTop and AreaBottom is colored.
  bamRect The rectangular region specifed by AreaLeft, AreaRight, AreaTop and AreaBottom is colored.
  bamRectInv The region outside the rectangular region specifed by AreaLeft, AreaRight, AreaTop and AreaBottom is colored.
Note: In order to implement more complicated background colorings you may use the event OnBeforeRenderData.

AreaColor The color of the rectangular background area.
AreaLeft The left border of the rectangular background region (in units of the coordinate system of the currently active layer).
AreaRight The right border of the rectangular background region (in units of the coordinate system of currently active layer).
AreaTop The top border of the rectangular background region (in units of the coordinate system of currently active layer).
AreaBottom The bottom border of the rectangular background region (in units of the coordinate system of currently active layer).


Last Update: 2023-Dec-13