How to Create a Legend for a Custom Palette
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?
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.
- Select the default legend on the chart from the page layout and delete it.
- From the toolbar, drag in a new table with one row and two columns
- Move the chart into the first cell.
- From the toolbar, drag a repeater table to the second cell.
- From the toolbar, drag a text item into the repeater table with a single space entered as text.
- From the data items tab, drag the data item on which the conditional palette is applied.
- Select the text item, then select Conditional Styles from the right-hand properties pane.
- Click New Conditional Styles then select Advanced Conditional Style.
- Create new conditions which mirror your conditional palette conditions.
- Click the Edit Pencil on each new condition and change the background color to the associated color in your conditional palette.
- 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.
More support for:
Cognos Business Intelligence
Software version: 8.4, 8.4.1, 10.1, 10.1.1, 10.2
Operating system(s): AIX, HP-UX, Linux, Solaris, Windows
Reference #: 1632538
Modified date: 2014-09-12