Sparkline

Generate simple sparkline charts to visualize data trends.

Use the sparkline widget to create compact and easy to understand line charts. Configure sparkline properties to insert inline lightweight charts. The sparkline widget is available under INTEGRATION > CHARTS. When designing application pages, drag-and-drop GESparkline to a container.

The following list of properties are specific to this widget. For common properties, refer to Page Components.

Table 1. Sparkline Properties
Property Description
Title Enter a title name for the sparkline. This name helps to identify the sparkline chart at runtime.
Engineering Unit Enter the engineering unit of measurement for values.
Height - 0 equals 100% Set the height in pixels. If set to 0, the sparkline chart occupies 100% of its container.
Font Color Select a font color for the title name, current value, and engineering unit.
Font Size (px) (0 equals Dynamic) Set the font size in pixels. If set to 0, the font size becomes dynamic, which means the font is resized based on the height of the widget.
Line Color Select a color for the line.
Line Width Enter a value in pixels that defines the thickness of the line in the chart.
Number of decimals Enter the number of decimal places to format values.

For 1 decimal place, the value is rounded off to the nearest tenths; for 2 decimal places, the value is rounded off to the nearest hundredths, so on.

Source - Value Use any of these options to provide values for sparkline. The only output field should be Value.
  • Select the Query tab to choose from queries that return Value as output.
  • Select the Global tab to choose from output fields available as global parameters.
  • Select the Manual tab, and enter the value in the text field.
  • Select the Formula tab to add a formula that returns an Value as output.
Result Set Index This property is applicable for Historian REST queries only. It allows to define which index of the result set the widget should use as input data. Default is 0.

For example, consider a Historian REST query that returns data for three tags.

  • If you want the widget to use the first tag data from the query result set, then set the index value as 0.
  • To direct the widget to use the second tag data, enter the index value as 1.
  • Similarly, you can set index values as 2, 3, 4, etc. based on the data to provide as input to the widget.
Reverse Sorting Order This property is applicable for Historian REST queries only. It helps to reverse the query result set.

Select the check box to provide the bottom record value as input to the widget.

Clear the check box to provide the top record value as input to the widget.

When you apply this property to REST queries that return more than one record for each input tag, the records of the selected tag (use Result Set Index to select the tag) are reversed.

For example, consider a Historian REST query with two input tags (tag1 and tag2); each with 100 records as result. Set the Result Set Index as 0 and verify the following:

  • If you selected the Reverse Order check box, then the 100th record (last) value of tag1 is displayed on the sparkline.
  • If you cleared the Reverse Order check box, then the first record value of tag1 is displayed on the sparkline.