You can add further value to your graph by using conditional styling to highlight certain defined data with specific styles and colors.
For example, you can apply the color red to all departments that did not reach their sales quotas and apply the color black to all departments that did reach their sales quotas. In this example, the user can view quickly which departments did or did not reach their quotas. To examine how the results of one department may impact the results of a second department, you may want to provide a drill-down to a report that examines this possibility.
You can apply color to the following graph types:
You can apply conditional styling using StyleSheets.
Note: Conditional styling is only supported for Y-axis values.
Identifies data as the graph component to which color is being applied. This value must appear at the beginning of the declaration.
Is the graph subcomponent to which you want to apply color. Valid graph subcomponents are COLUMN and ACROSSCOLUMN.
Identifies a column by its position in the report. To determine this value, count BY fields, display fields, and ROW-TOTAL fields, from left to right, including NOPRINT fields. For details, see Identifying a Report Component in a WebFOCUS StyleSheet.
Identifies the color that you want to apply to the graph component or subcomponent. For a list of valid colors, see Formatting Report Data.
Is any Boolean expression that specifies conditions for applying the specified color to the graph component. The expression must be valid on the right side of a COMPUTE command. For details, see Using Expressions.
Note: IF... THEN ... ELSE logic is not necessary in a WHEN clause and is not supported.
All non-numeric literals in a WHEN expression must be specified within single quotation marks.
The following illustrates how you can apply conditional styling to a graph.
GRAPH FILE GGSALES SUM UNITS DOLLARS ACROSS PRODUCT ON GRAPH SET STYLE * 1. TYPE=DATA,COLOR=BLUE,$ 2. TYPE=DATA,ACROSSCOLUMN=N2,COLOR=FIREBRICK,$ 3. TYPE=DATA,ACROSSCOLUMN=N2,COLOR=SILVER,WHEN=N2 GT 5000000,$ 4. TYPE=DATA,ACROSSCOLUMN=N1,COLOR=LIME,WHEN=N1 LT 200000,$ ENDSTYLE END
The output is: