Metrics provide a graphical view of key data that is relevant to a specific role. The chart control available with the Office Web Components (OWC) is used to display the metric data. Information displayed by the metric typically comes from SQL queries issued to retrieve data from the application’s tables.
Each metric you create for your product must have a unique integer ID. We recommend that you create a constant for this ID. For example, the constant METRIC_TOP5LEADS represents the unique ID for a metric in the sample integrating application.
The chart for a metric has several characteristics that define how it displays data. Each chart can have the following:
Chart type The type of chart to display. Constants for the various chart types are available in Dexterity. Refer to Metric chart reference for a complete list of the chart types supported.
Name The chart name is displayed at the top of the chart.
Category label The category label is displayed at the bottom of the chart, describing the categories of data being charted.
Data categories Up to 12 categories of data can be displayed by the chart.
Value label The value label is displayed on the left side of the chart, describing the values that are being charted.
Data series with labels Up to 10 data series can be displayed on a chart, along with labels for each series.
Legend A chart legend that describes each series is shown when the first data series displayed on the chart has a label provided for it.
The following illustration shows a chart for a metric. The characteristics of the chart are indicated by the labels applied.
A separate procedure is used to retrieve the data used to generate the metric. Typically, pass-through SQL is used to retrieve the data from the application’s tables. This data is passed back to the Home Page through parameters required for the metric procedure. You will learn more about this in Writing a metric procedure.
Each metric that a user adds to their Home Page is processed (data is retrieved) when the Home Page is loaded or refreshed. The first metric in the user’s list of metrics is displayed on the page. Other metrics are displayed when the user chooses them from the list.