Region Parameters

Region definitions are used extensively throughout NetCharts in order
to display titles, legends, data labels, etc. A region is displayed as a rectangular
box with a specified color and border type.

You have the option to specify an image file that will be used in place of the region's background color. Regions are used throughout NetCharts as an optional background for labels.

The following region parameters are supported by one or more charts:

Background    = (Color, BorderType, BorderWidth, "Image URL",
                 ImageFormat, BorderColor, TLCornerStyle, TRCornerStyle, BRCornerStyle, BLCornerStyle, CornerColor); 
HeaderBox = (Color, BorderType, BorderWidth, "Image URL", ImageFormat, BorderColor, TLCornerStyle, TRCornerStyle, BRCornerStyle, BLCornerStyle, CornerColor); FooterBox = (Color, BorderType, BorderWidth, "Image URL", ImageFormat, BorderColor, TLCornerStyle, TRCornerStyle, BRCornerStyle, BLCornerStyle, CornerColor); LeftTitleBox = (Color, BorderType, BorderWidth, "Image URL", ImageFormat, BorderColor, TLCornerStyle, TRCornerStyle, BRCornerStyle, BLCornerStyle, CornerColor);
RightTitleBox = (Color, BorderType, BorderWidth, "Image URL", ImageFormat, BorderColor, TLCornerStyle, TRCornerStyle, BRCornerStyle, BLCornerStyle, CornerColor);
LegendBox = (Color, BorderType, BorderWidth, "Image URL", ImageFormat, BorderColor, TLCornerStyle, TRCornerStyle, BRCornerStyle, BLCornerStyle, CornerColor); DwellLabelBox = (Color, BorderType, BorderWidth, "Image URL", ImageFormat, BorderColor, TLCornerStyle, TRCornerStyle, BRCornerStyle, BLCornerStyle, CornerColor); NoteBox = (Color, BorderType, BorderWidth, "Image URL", ImageFormat, BorderColor, TLCornerStyle, TRCornerStyle, BRCornerStyle, BLCornerStyle, CornerColor); NodeBox = (Color, BorderType, BorderWidth, "Image URL", ImageFormat, BorderColor, TLCornerStyle, TRCornerStyle, BRCornerStyle, BLCornerStyle, CornerColor);

All of the attributes are optional. If they are not specified, default values will be used, depending on the specific parameter being defined.

The following attributes are supported:

 Color  The color of the region. If an image attribute is also defined, this color is drawn first, followed by the image, allowing this color to show through any transparent parts of the image.

Translucency can be added to any color specification by appending a translucency qualifier between 0 and 250. For example red_0 or xFF0000_0 is completely translucent, while red_250 and xFF0000_250 both represent solid red.

BorderType  The following border styles are supported:
NONE    - No border
BOX     - Simple Box outline
SHADOW  - Shadow border
RAISED  - Raised border
RECESS  - Recessed border
When the BOX and SHADOW styles are specified, the border color will be black. When the RAISED and RECESS styles are specified, the border color will be chosen based on the region color.
 BorderWidth  This attribute defines the width of the border in pixels.
 Image URL  This attribute can be used to specify an image file to be used to fill the region. Any valid URL may be specified. If a relative URL is given, it will be interpreted based on the Document Base of the HTML document.

In order to make it easier to specify the location of image files that are contained within the class path or Web hierarchy, the following keywords are supported within an image URL definition:

$DOCBASE   = document base
$CODEBASE  = code base
$NETCHARTS = $CODEBASE/netcharts
$ICONS     = $NETCHARTS/icons
$IMAGES    = $NETCHARTS/images
$SYMBOLS   = $NETCHARTS/symbols
$PATTERNS  = $NETCHARTS/patterns

These variables are only interpreted if they are used as the first value in a GIF URL. For example, the following URL. will cause the chart to look in the "images" sub-directory in the netcharts classpath for the given file:

"$IMAGES/cut.gif"

NOTE: Depending on your browser environment, files in the $DOCBASE directory hierarchy may not be accessible because of security restrictions. For that reason, data and image files used by all NetCharts examples are located within the $CODEBASE directory hierarchy.

 ImageFormat  Specifies how the image will be displayed in the region, with the following types supported:
TILE   - (default) tiles or clips the image if not
         the same size as the region.
SIZE   - scales the image to the size of the region.
CENTER - image is centered in the region

In all cases, the image is displayed AFTER the region has been filled with the specified color, allowing the region color to show through any transparent parts of the image.

 BorderColor The color used to draw the Region border when the BOX BorderType is selected.
 NNCornerStyle The drawing style for each of the four corners of the region. Styles are specified in a clockwise fashion starting in the upper left - Top Left, Top Right, Bottom Right, Bottom Left. Legal values are SQUARE, SNIP and ROUND. The default is SQUARE.
 CornerColor The color to fill corners of a region when the CornerStyle is SNIP or ROUND.

 

Example

In this example, four titles are defined, using different underlying regions.

Header        = ("Default Label",black,"SansSerif",12,0);
HeaderBox = (null,NONE,5,null,TILE,black);
Footer = ("Multi-line Footer\nwith Shadow",black,"SansSerif",12,0);
FooterBox = (lightgray,SHADOW,5,,TILE,);
LeftTitle = ("Rotated Label",saddlebrown,"SansSerif",16,90);
LeftTitleBox = (goldenrod,RAISED,4,,TILE,);
RightTitle = (" Large Label\nwith Graphic background",black,"Monotype Corsiva",20,0);
RightTitleBox = (,NONE,2,"$PATTERNS/flock.gif",TILE,black);
BackgroundFillPattern = (GRADIENTHORIZONTAL,slategrey,white,);

Images can be used in a variety of ways within a region. In this example, a simple DGRID pattern fill is used to show the background . Another image is used in a CENTER mode as the header, with no header label. Finally, the cut and paste images are used in conjunction with differently colored regions, with overlaid labels.

BackgroundFillPattern = (DGRID,linen,seagreen,);
Header = ("");
HeaderBox = (,,, "$IMAGES/nc220x90.gif",
               CENTER);
LeftTitle = (" Cut\n \nHere", black);
LeftTitleBox = (pink, SHADOW, 4, "$symbols/cut.gif", CENTER);
RightTitle = ("Paste\n \n Here", black);
RightTitleBox = (lightgreen, SHADOW, 4, "$symbols/paste.gif",
               CENTER);

Note
In all cases, pathname variables are used to specify the location of each image file in the classpath hierarchy.