Solutions Company Statit Training Home

Setting Graph Background

Abstract: How to change the background color of the graphics generated by Statit

Products: Statit e-QC, Statit e-Server, Statit Custom QC

Statit Custom QC

The default background color for Statit Custom QC is lightgray for the graphics it generates. If you want to change this color, you simply need to specify the color you want the background to be in the Options|Graphics menu pick, which gives you the Statit Graphics Options dialog.

Statit Graphics Options

The Statit Graphics Options dialog lets you specify many default characteristics for the graphics generated by Statit. The characteristics you want to specify are the Chart Background Color and the Dataspace Background Color.

The Chart Background Color is the background color of the area around the graph itself, that is, the area where the title, axis labels, and other text appears. The graph area itself is called the Dataspace.

To remove the lightgray background, change these backgrounds to Normal. This will make the background appear white on most displays and printers. This setting is saved for future Statit sessions, so you need only do this once on a given computer.

Specifying Backgrounds in Macros

When writing a macro, the command setgraph is used to control the background colors. For example:

setgraph /chartbackground=normal /databackground=normal

Using setgraph will change the background colors for the current and all following sessions of Statit. (These settings are stored in the Windows Registry.) If you want to affect only a specific graphic, use Custom Graphics or change the global variables which control graph colors.

Global Color Variables

The following global temporary variables may be set to control the colors of your graphics. The colors specified on these variables are used on graphics which are generated, but they are not stored in the registry as when you use setgraph. The following statements set the default values of these variables.

let %sg_chart_background = LightGray
let %sg_chart_border = Black
let %sg_data_background = LightGray
let %sg_data_border = Black

Using Custom Graphics

Custom Graphics commands give you complete control over the appearance of a graph you are generating. These commands are available by interactively editing the graph in the Statit Graph Window (using the arrow toolbar icon), or by using commands in a macro or proc.

When you are creating a macro or proc, you should first generate the graph you want, and use the command "graph show" to display the Custom Graphics commands which make up the graph. Identify the base chart, which is probably chart 1. Use the chart command to change the background color of the graph. For example:

chart 1 set ;
  /background=normal /border=black ;
  /databackground=normal /databorder=black

The color "Normal" is used in Statit to define a color which usually means "no color". That is, it is used on backgrounds to ensure that no other chart components are covered up or obscured by the background color. Charts which overlay other charts use the color "normal" which allows the lower charts to show through.

Statit e-QC

In Statit e-QC, the default background colors are set in the Statit e-QC Properties under the Administration Folder. For individual macros or for individual charts within a macro they can be set in the macro itself.

let %Orig_chart_background = %sg_chart_background
let %sg_chart_background= Cyan
let %orig_data_background = %sg_data_background
let %sg_data_background= Sand

Be sure to change the globals back or the backgrounds will remain changed for any chart in the current session.

let %sg_chart_background= %Orig_chart_background
let %sg_data_background= %orig_data_background

The Custom Graphics commands given above work as well.

If you would like additional information, please send email to