Nevron Vision for SharePoint Documentation
Gauge / Gauge - Getting Started
In This Topic
    Gauge - Getting Started
    In This Topic
    The purpose of this topic is to provide basic understanding of gauge terminology and how pivot gauges are used in data analysis.
     Gauge Elements

    Gauges are composed of various elements such as gauge areas, titles, axes, ranges, pointers etc. that are illustrated by the following image:

    Following is a brief description of the gauge elements shown on the above picture along with a link to a more detailed topic:

    Title - titles are generally used to display text describing the contents of the gauge. See Titles for more info.

    Pointers - pointers are used to display a current measurement along an axis. In the image above there are two pointers - the first one is visualized as a marker with a triangle shape and the second one is visualized as a needle extending from the gauge center. See Pointers for more info.

    Ranges - ranges are used to highlight important ranges of values on the gauge axes. In the image above the range is configured to cover the [65, 100] values range and uses "Start To End" gradient style. See Ranges for more info.

    Major and Minor Ticks - major and minor ticks pin point values on the scale. See Ticks for more info.

    Scale Labels - scale labels are displayed at the values of the major ticks on the axis.

    Numeric Display - the numeric display is a type of gauge area that displays values in LED fashion. See Numeric Display for more info.

    State Indicator - the state indicator is a type of gauge area that visually shows whether it's value falls within a specified range. This can be useful to visually prompt the user when values of pointers, ranges or numeric displays enter critical ranges. See State Indicator for more info.

     My First Gauge
    We assume that you are in gauge web part design mode. See the Adding the WebParts to Pages for a complete discussion on how to add the web part to a page and run the gauge designer.

    The first step in making a gauge is to connect it to a data source - the Connecting to Data topic will guide you through this process. A data source is generally a table with rows and columns. The values in each column are in most cases of the same type (e.g. numbers, texts, date-times etc.).

    Lets assume that you have connected to this data source:

    By default the Nevron Gauge for SharePoint is configured to have one gauge area with a radial gauge with a single axis and pointer, so we will now investigate the possibilities to display some metrics of the data source. Generally, there are two strategies:

    1. Table View - this approach displays metrics of the data source in general.

    For example: to create a gauge, which shows the average sales in general do this:

    • Go to Gauge Page
    • Go to Gauge Areas > Axes > General
      - In the Data > Min field type: =MIN(Fields!sales). Click the Calculator button and select First.
      - In the Data > Max field type: =MAX(Fields!sales). Click the Calculator button and select First.
    • Go to Gauge Areas > Pointers > General
      - In the Data > Value field type: =AVG(Fields!sales). Click the Calculator button and select First.

    When you click the Preview page the following gauge will show:

     

    The gauge min value is actually 69, but the axis is by default snapping to the nearest tick to increase readability. You can disable snapping to tick or add marker pointers for the actual min-max. 

    Q. What have we done?

    A. We have used the built-in statistical functions of the pivot engine. The axis-min is the minimum value found in the sales column, the axis-max is maximum value in the sales column and the pointer-value is the average of all values in the sales column.

    Q. When to use?

    A. When the data is already aggregated (e.g. if you use a SELECT statement with a GROUP BY clause), or when you want to display statistics for the data source in general.

    1. Matrix View - this approach displays aggregated metrics of the data source.

    For example: to create a gauge, which shows the average sales per company do this:

    • Go to Gauge Page
    • Go to Pivot Page
      - Drag and Drop the company field on the Drop Category Fields Here spot.
    • Go to Gauge Areas > Axes > General
      - In the Data > Min field type: =SUM(Fields!sales). Click the Calculator button and select Min.
      - In the Data > Max field type: =SUM(Fields!sales). Click the Calculator button and select Max.
    • Go to Gauge Areas > Pointers > General
      - In the Data > Value field type: =SUM(Fields!sales). Click the Calculator button and select Average.

    When you click the Preview page the following gauge will show:

    Q. What have we done?

    A. We have first grouped the data by company. For the axis-min, axis-max and pointer-value we have calculated the sums of sales for each company group. Then we have used the gauge formulas to extract the min, max and average values from these lists of sums.

    Q. When to use?

    A. When the data is not aggregated or when you want to resample the data to extract more complex aggregate values from the data source.

    In data analysis this method is known as double data aggregation.

    Double data aggregation is a built-in feature of most SQL dialects (for example SQL Server and Oracle support SELECT statements with double aggregation) - so it makes sense to use them, if you connect to such data sources. Be warned however that more complex scenarios (for example: mixing double data aggregation with simple data aggregation, record and group filtering etc.) are impossible to achieve in a single SELECT statement.

    For more basic data sources (such as SP Lists, BDC, Excel spreadsheets etc.) this feature of the gauge is truly indispensable.

    See Also