GKPI Procedure

Example 1: Using the Default Colors as the Active Colors

Features:

PROC GKPI statement option: MODE=RAISED

HSLIDER statement options:
COLORS=
ACTIVECOLORS=
Sample library member: GKPGRSLD
The default colors described in Default Colors can be used as the active colors instead of the inactive colors. This example uses the same value of gray for all ranges for the inactive color. It uses the red, orange, yellow-green, and green colors shown in GKPI Procedure Default Colors as the active colors.
horizontal slider using default colors as active colors

Program

goptions reset=all device=javaimg xpixels=180 ypixels=110;
proc gkpi mode=raised;
hslider actual=-6.7 bounds=(-10 -5 0 5 10) /
   colors=(cxB2B2B2 cxB2B2B2 cxB2B2B2 cxB2B2B2)
   activecolors=(cxD06959 cxE1A05D cxBDCD5F cx84AF5B);
run;
quit;

Program Description

Set the graphics environment.Use the XPIXELS and YPIXELS options in the GOPTIONS statement to scale the KPI charts to a size that would be appropriate for use in a dashboard.
goptions reset=all device=javaimg xpixels=180 ypixels=110;
Generate the KPI chart. Specify the range boundaries, actual KPI value, and colors. Boundary values can be positive or negative or both, but must be specified in either ascending or descending order. All colors are specified as hexadecimal RGB values. The same value of gray, cxB2B2B2, is used as the inactive color for all ranges. The default colors listed in Hexadecimal Values for GKPI Procedure Default Colors are used as the active colors.
proc gkpi mode=raised;
hslider actual=-6.7 bounds=(-10 -5 0 5 10) /
   colors=(cxB2B2B2 cxB2B2B2 cxB2B2B2 cxB2B2B2)
   activecolors=(cxD06959 cxE1A05D cxBDCD5F cx84AF5B);
run;
End the procedure. The GKPI procedure supports RUN-group processing, so it is recommended that you enter the QUIT statement to end the procedure.
quit;