Chart configuration

Various aspects of charts can be configured. This is accomplished by setting the CONFIG attribute on the UIM field in question. The appropriate XML configuration file must contain a configuration section with a unique identifier matching the text in the CONFIG attribute.

All the necessary chart configuration files are to be in your component directory.

Different types of charts are currently configured in separate configuration files:

The following is a sample of a chart configuration file:

<CHART-CONFIG>
  <CONFIG ID="Column.Chart.Config" ORIENTATION="VERTICAL"
          X_AXIS_LABEL="Vert.BarChart.X-Axis"
          Y_AXIS_LABEL="Vert.BarChart.Y-Axis">
    <LEGEND CODETABLE="Attendance">
      <ITEM CODE="CR1"/>
      <ITEM CODE="CR2"/>
      <ITEM CODE="CR3"/>
    </LEGEND>
    <LINK LOCATION="ComponentRedirect">
      <PARAMETER NAME="vertID" VALUE="ID" USE_PAGE_PARAM="false"/>
      <PARAMETER NAME="dueDate" VALUE="START_DATE"
                 USE_PAGE_PARAM="false"/>
      <PARAMETER NAME="transID" VALUE="ID" USE_PAGE_PARAM="true"/>
    </LINK>
    <CAPTION_LINK LOCATION="AnotherPage">
      <PARAMETER NAME="vertID" VALUE="ID" USE_PAGE_PARAM="false"/>
      <PARAMETER NAME="dueDate" VALUE="START_DATE"
                 USE_PAGE_PARAM="false"/>
      <PARAMETER NAME="transID" VALUE="ID" USE_PAGE_PARAM="true"/>
    </LINK>
  </CONFIG>

  <CONFIG ID="BarChart.Config" ORIENTATION="HORIZONTAL"
          CAPTION="Status.Caption"
          CAPTION_TEXT_CODETABLE="Cars"
          MIN_HEIGHT="200" MAX_HEIGHT="500">
    <LEGEND VISIBLE="true" CODETABLE="OldCars">
      <ITEM CODE="CR1"/>
      ...
    </LEGEND>
    <LINK LOCATION="TransferPage">
      <PARAMETER NAME="horID" VALUE="ID" USE_PAGE_PARAM="false"/>
      ...
    </LINK>
  </CONFIG>
  <CONFIG ID="BarChart.Config" TYPE="line"
          CAPTION="Line.Chart.Caption">
    <LEGEND>
      <ITEM CODE="CR1"/>
      ...
    </LEGEND>
    <LINK LOCATION="ComponentRedirect">
      <PARAMETER NAME="horID" VALUE="ID" USE_PAGE_PARAM="false"/>
      ...
    </LINK>
  </CONFIG>
</CHART-CONFIG>

The CHART-CONFIG root element contains only CONFIG elements. The CONFIG element contains all configuration for a particular field, identified by the ID attribute. The following table describes all attributes of the CONFIG element. BarChart.properties referred to in this table is a properties file in the client application's <CLIENT_DIR>\components\core folder, used to look up values required.

Table 1. Attributes of the CONFIG element
Attribute Description
ID Unique identifier for this CONFIG element.
TYPE Can be either line or pie, depending on required type of chart. If not present, ORIENTATION attribute will be used to define if bar or column chart is to be displayed.
ORIENTATION Can be either HORIZONTAL or VERTICAL, depending on required type of chart, HORIZONTAL meaning bar chart and VERTICAL - column chart.
CAPTION_TEXT_CODETABLE Code table currently used for label captions throughout a chart. If not specified, literal values from chart data will be used.
MAX_VALUE Maximum value for a numeric axis of column or bar chart. Automatically calculated to fit the maximum element, if not specified.
MAX_INCREMENT Maximum increment value for a numeric axis of a chart. Numbered ticks are drawn on a chart at the specified intervals. If not specified, numbered ticks are placed at uniform intervals along the numeric axis, taking into account it's maximum value.
X_AXIS_LABEL Key to a text property in BarChart.properties. This text is used as the label for the x-axis in the column or line chart, or y-axis in the bar chart. Not used on pie chart.
Y_AXIS_LABEL Key to a text property in BarChart.properties. This text is used as the label for the y-axis in the column or line chart, or x-axis in the bar chart. Not used on pie chart.
MIN_HEIGHT This setting is used to define minimum chart object height and is to be specified in pixels. Where a chart contains a small number of items and would be short based on that content size, minimum height introduced by this setting is used. The setting is optional, so 250px default minimum height is used if MIN_HEIGHT is not specified.
MAX_HEIGHT This setting is used to define the maximum chart object height on screen and should be specified in pixels. Where a chart contains numerous items and its contents exceeds the MAX_HEIGHT specified, this setting is used for the chart object height and a vertical scrollbar appears to allow for access to the rest of the items in the chart. The setting is optional and a default of 250px is used if the attribute is not specified. A value of -1 for MAX_HEIGHT means that the chart takes whichever height its content needs to be displayed in full. It is worth noting that the minimum height setting, either default or explicit, is still taken into account in this case. As a result, charts with little content will not be shorter than minimum or default height implies. Finally, a chart with MAX_HEIGHT set to -1 will not display its vertical scrollbar and the browser scrollbar will appear once the chart is too big to fit into the screen area available.
CAPTION Key to a text property in BarChart.properties. This text is used as the label for the whole chart.
Note: The example lists sample ChartConfig.xml contents. The older format in BarChartConfig.xml is almost the same except that the root element is called BARCHART-CONFIG.

The older versions of BarChartConfig.xml do not contain configuration for label links. This element might be added, if required to this file directly; it is preferable, though, to create appropriate full configuration with the same ID in the ChartConfig.xml which will override the older version.

MIN_HEIGHT and MAX_HEIGHT settings currently do not apply to line or pie charts and will be ignored for these types.

The CONFIG element has three child elements: LEGEND, LINK and optional CAPTION_LINK.

Texts for chart caption and axes labels can be customized and localized by creating a properties file called BarChart.properties in the client application's <CLIENT_DIR>\components\core folder and placing there values under keys, corresponding to the ones specified among CONFIG element parameters as described above.

In addition, the text displayed for the word total displayed in the bar tool-tips is customizable using the key total.tooltip.text in the BarChart.properties file.

Note: Bar colors are not customizable in charts and are automatically calculated by Adobe FLEX.
Collapsible Cluster Support: Collapsible clusters are not supported for any cluster containing this widget.