Applying Conditional Styling to a Graph

How to:

You can add further value to your graph by using conditional styling to highlight certain defined data with specific styles and colors. Conditional styling, also referred to as stoplighting, enables you to define conditions that determine when to apply particular fonts, point size, text style, foreground and background color, and drill-down procedures to the data in your report, when the report is run.

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:

Conditional styling is only supported for Y-axis values.


Top of page

Example: Applying Conditional Styling to a Graph

The following illustrates how you can apply conditional styling to a graph. In this example:

The output is shown in the following image.

Conditional styled graph


Top of page

x
Procedure: How to Apply Conditional Styling to a Graph in the Developer Studio Environment

This procedure is applicable to the Graph Assistant in the Developer Studio environment.

  1. From the Field selection tab of the Graph Assistant, highlight the field (from the Y-axis Fields box) where you wish to apply conditional styling and click Conditional styling from the Display subtab.

  2. From the Conditional Styling dialog box, click Add.
  3. From the Condition List dialog box, click New.

    The Edit Condition dialog box opens.

  4. Type a name for the condition or accept the default.
  5. From the Field window, select the field for which you want to define a condition.
  6. Select a relation from the Relations List.
  7. Specify a value by doing one of the following:
    • Type a literal value in the Value box.

      or

    • Click the Values button to display existing data source values and select a value.
  8. Click OK.

    The condition is now added to the Condition List in the Condition List dialog box.

    Tip: To create another condition, repeat steps 3 to 8.

  9. After creating all of your conditions, click OK from the Condition List dialog box.
  10. To attach a style to the condition, highlight the condition in the Condition List and click the Color drop-down list.
  11. Select a color from the drop-down list and click OK.
  12. After applying styles to all the desired conditions, click OK to return to the Graph Assistant.

WebFOCUS