How to Create a Legend for a Custom Palette

Technote (FAQ)


Question

I've created a chart with a custom palette within IBM Report Studio. After doing so, the colors in the default legend no longer reflect those that display in the chart. How do I hide the default legend and create a new legend for my custom palette?

Answer

In order to display the same colors for both the chart and the legend, create your own legend using a repeater table and conditional styles.

The steps below provide a general guide however some object properties, such as border style and box padding, may need to be modified depending on the existing report layout to meet presentation requirements.

  1. Select the default legend on the chart from the page layout and delete it.
  2. From the toolbar, drag in a new table with one row and two columns
  3. Move the chart into the first cell.
  4. From the toolbar, drag a repeater table to the second cell.
  5. From the toolbar, drag a text item into the repeater table with a single space entered as text.
  6. From the data items tab, drag the data item on which the conditional palette is applied.
  7. Select the text item, then select Conditional Styles from the right-hand properties pane.
  8. Click New Conditional Styles then select Advanced Conditional Style.
  9. Create new conditions which mirror your conditional palette conditions.
  10. Click the Edit Pencil on each new condition and change the background color to the associated color in your conditional palette.
  11. Hit OK on the Conditional Styles windows to close them.

In this example, a table was used to space the chart and legend appropriately but other implementations, such as blocks, may be more appropriate depending on the the specific report design requirements. The repeater table and conditional styles are used in combination to implement the actual legend.

Related information

Steps to Create an Advanced Conditional Style

Rate this page:

(0 users)Average rating

Document information


More support for:

Cognos Business Intelligence
Report Studio

Software version:

8.4, 8.4.1, 10.1, 10.1.1, 10.2

Operating system(s):

AIX, HP Itanium, HP-UX, Linux, Solaris, Windows

Reference #:

1632538

Modified date:

2013-04-01

Translate my page

Machine Translation

Content navigation