Siebel Tools Reference > Special-Purpose Applets and Controls > Chart Applets >

Configuring Chart Applets


A chart is built as an applet containing one or more Chart object definitions. The Chart object type is a child of applet. The Chart object type has Chart Element children. This section describes how chart applets are configured.

You can also use the Chart Applet Wizard to create chart applets. See Using the Chart Applet Wizard.

Business Component Mapping

A chart applet has, like all applets, a business component identified in its Business Component property. Records in this business component—subject to the current view, the current query, and visibility considerations—provide the data displayed in the applet. In the case of a chart applet, specific fields are used to provide the data for the category, data point, and series axes. The correspondence between axes and fields is specified in properties in the Chart object definition.

In the simplest case—a single bar or line graph, with no series axis—a category field and a data point field are specified. Pairs of category and data point field values are plotted as points or bars. If multiple records have the same category value, their data point values are added together.

The Oppty Chart Applet - Source Analysis applet provides an illustration of this process (Figure 209).

Figure 209.  Oppty Chart Applet - Source Analysis
Click for full size image

This applet displays the number of opportunities on the data point axis plotted against the source of the opportunity (referral, magazine article, Web site, and so on) on the category axis. To generate the data required for the curve, the Source field in each record is checked and the number of opportunities for each distinct source value is tallied. The result is a two-row temporary table with a column for each source, as shown in Figure 210.

Figure 210.  Temporary Table for Single-Curve Chart Data

For a multiple-curve chart, a row is added to the temporary table for each curve in the series (Figure 211).

Figure 211.  Multiple-Curve Chart
Click for full size image

The temporary table for a multiple-curve chart is illustrated in Figure 212.

Figure 212.  Temporary Table for Multiple-Curve Chart Data
Click for full size image

To define the data mapping from the business component into the chart applet, you need to define the following properties in the Chart object:

The preceding descriptions cover the use of these properties for the most general cases. There are a number of special cases in which these properties are configured differently than described. Some special case configuration scenarios are described in the sections that follow. For descriptions of the properties, see Object Types Reference.

Configuring the Picklists

A chart applet typically provides one or more picklists along the upper edge that allow the user to reconfigure the chart's presentation or use of data. These picklists are illustrated in Figure 213.

Figure 213.  Picklists in a Chart Applet
Click for full size image

These picklists are described as follows:

Each of the four picklists requires a corresponding control of type ComboBox, as a child object definition of the chart applet. Each has required values in the Name and MethodInvoked properties, as detailed in Table 48.

Table 48.  Name and MethodInvoked Properties for Four ComboBox Controls
Picklist
Control Name
MethodInvoked
Type
ChartPicktype
PickChartType
Show
ChartPickfunction
PickYAxis
By
ChartPickby
PickXAxis
By #2
ChartPickby2
PickZAxis
Configuring Show Picklists

The Show picklist (the combo box control named ChartPickfunction) can be configured to display a selection list of field/function combinations, the selection from which determines what values are plotted along the Y axis. Multiple combinations of source field and function are provided in the selection list. The Y axis title is obtained from the text in the user's Show picklist selection.

To configure the Show picklist, the following three properties of the Chart object definition are used:

For example, you could configure a Show picklist with explicit syntax that offers three choices: Number of Opportunities, Opportunity Revenue and Opportunity Expected Revenue. This is configured with the property settings shown in Table 49.

Table 49.  Show Picklist Properties for Sales Method Bar Chart
Property
Value
Picklist Functions
Number of Opportunities, Opportunity Revenue, Opportunity Expected Revenue
Data Function
Count,Sum,Sum
Data Point Field
Name,Revenue,Expected Revenue

As can be seen from the table, there are three values in each comma-separated list. The first entry, Number of Opportunities, performs a Count function on the Name field. The second entry, Opportunity Revenue, performs a Sum function on the Revenue field. The third entry, Opportunity Expected Revenue, performs a Sum function on the Expected Revenue field.

An example of a Show picklist configured with implicit syntax and the standard function list is in the Lead Source Analysis chart in the Opportunity New Business Analysis view in Siebel Sales (Oppty Chart Applet - New Business). The picklist offers three choices: Number of Opportunities, Opportunity Revenue, and Average Opportunity Revenue. This is configured with the property settings shown in Table 50.

Table 50.  Show Picklist Properties for Lead Source Analysis Chart
Property
Value
Picklist Functions
Number of Opportunities,Opportunity Revenue, Avg Opportunity Revenue
Data Function
Count
Data Point Field
Revenue

The value of Revenue in the Data Point Field property applies to all entries in the picklist.

The value of Count in the Data Function property is unnecessary; it could be left blank instead. Whenever the number of entries in the Data Function property is not the same as the number in the Picklist Functions property, the system supplies a standard Data Function list. This list is the following:

Count,Sum,Average,Plot

The first picklist entry, Number of Opportunities, performs a Count function on the Revenue field. The second entry, Opportunity Revenue, performs a Sum function on the same field. The third entry, Avg Opportunity Revenue, performs an Average function.

This means of configuring Show picklist behavior predates the ability to specify triplets of name, function, and field, and is more restrictive. It has been retained for backwards compatibility with earlier versions of Siebel applications. Generally it makes more sense to explicitly specify the values in the three properties.

Configuring the By Picklist

The contents of the Category Field property in the Chart object definition determine the behavior of the By picklist (ChartPickBy combo box control), as follows:

Configuring the Second By Picklist

The contents of the Series Field property in the Chart object definition determine the behavior of the second By picklist (the combo box control named ChartPickBy2), as follows:

Charts with Multiple Curves Plotted Against One Y Axis

Multiple line graph curves can be plotted against the same Y axis, based on different source field/function combinations. The name for each curve appears in the legend. For example, you may want revenue, expected revenue, and net profit to appear as superimposed curves on the same line graph. To accomplish this, set the following property values in the Chart object definition:

You should also remove the Show combo box and its label in the Applet Web Editor.

Charts with Two Y Axes

Two line graph curves can appear in the same Chart, plotted against different Y axes (one to the left of the graph, the other to the right). Any field/function combination can be used on the left Y axis, and likewise for the right. To accomplish this, set the following property values in the Chart object definition:

Axis Points—Limiting and Sorting

The number of X axis (category) or Z axis (series) labels can be limited to some predefined number. This can be useful if you are interested in displaying only the N highest or N lowest values for some field or calculated Y value. For example, you could display the 10 highest revenue accounts by charting the Revenue field in descending order and limiting the X axis to 10 data points. This is accomplished using two properties of the axis label Chart Element for the appropriate axes, as follows:

You can set up a sort specification on the Y axis independent of limiting the number of X or Z axis divisions. A sort specification on Y will order the data points regardless of whether you are limiting the display to the first N points. The converse is not true, however; it would not make sense to set a number of X or Z axis divisions without also setting a sort specification on Y.

You also can sort on X axis or Z axis labels instead of Y axis values. To accomplish this, you set the Sort Specification in the X axis (or Z axis) label Chart Element object definition rather than in the Y axis label. For example, if the X axis is displaying country names, they can appear alphabetically from left to right. This is different from sorting on Y axis values, which are numeric values from a field in a business component or function based on that field.

Chart Element Object Type

Chart Element is a child object type of Chart. The following types of Chart Elements (as specified in the Type field in the Chart Element object type) are supported:

The properties of the Chart Element that apply to the axis label for the X axis (Coordinates, Display Format, Divisions, List Of Values, Sort Specification, and Text) should not be used when specifying a list of X axis source fields, as they can be relevant only for one X axis field. Also, the text of the X axis title is determined dynamically from the combo box selection if the By combo box provides a list of source fields. Whatever is in the Text property in the AxisTitle chart element for the X axis is overridden at run time.

The same restrictions are relevant for the Z axis.

Making X-Axis Labels Vertical

You can make x-axis labels vertical so that they do not overlap with each other. To do this, set the Vertical property to TRUE for the Chart Element object whose Axis Id property is set to XAxis.

Sizing Chart Images

You can change the size of a chart applet by setting the HTML Width and HTML Height properties (in pixels) for the Chart control child object of the applet.

The default values are 1012 for HTML Width and 560 for HTML Height.


 Siebel Tools Reference
 Published: 20 October 2003