Configuration

Different types of heatmap can be configured by creating entries in the HeatmapConfig.xml file in your components directory, using the following format:

<HEATMAP_CONFIG>
  <CONFIG ID="Map1" NUM_COLS="10" NUM_ROWS="4"
          LEGEND_POSITION="LEFT"
          LEGEND_TITLE="Deadline"
          LEGEND_TITLE_PROPERTY="Localised.Legend.Title">
    <ITEM_LINK PAGE_ID="Sample_page">
      <PARAM NAME="configParameter" VALUE="ITEM_ID"/>
    </ITEM_LINK>
  </CONFIG>
  <CONFIG ID="Map2" NUM_COLS="6">
    ...
  </CONFIG>
</HEATMAP_CONFIG>

The attributes of a CONFIG element are summarized in the following table:

Table 1. Attributes for CONFIG element
Attribute Description
NUM_COLS This attribute allows you to set the number of items displayed in each row of the Heatmap
NUM_ROWS This attribute allows you to specify the number of visible rows in the Heatmap. If this attribute is set to less rows than are required to display the data, a vertical scrollbar will be provided. If this attribute is not present, the widget will expand to display as many rows as are required.
LEGEND_POSITION By default, the Heatmap legend is drawn to the right of the widget. This attribute can be used to draw the legend to the left instead, by setting it's value to LEFT.
LEGEND_TITLE The default title for a legend is Legend. This attribute can be used to specify a more logical title to use.
LEGEND_TITLE_PROPERTY Optional attribute used to customize/localize the displayed title. The value here is the key in the CDEJResources.properties file or its localized version (see Localization for more details on localization).

The ITEM_LINK element can be used to specify the page to which to link when a user clicks on an item in the Heatmap, by setting it's PAGE_ID attribute. The PARAM child element can be used to specify what page parameters to pass (the NAME attribute) and what data items to use as their value (the VALUE attribute). Values which don't match any attributes in the ITEM elements in the Heatmap XML are assumed to be literal values.

To specify which configuration to use for a given instance of the Heatmap widget, the CONFIG attribute of the field containing the widget should be set to the ID of the desired configuration.