Gauge

The gauge component is used to display a type of gauge to visualize data. Below are the available gauge types:

Arc Gauge

Circular Gauge

Linear Gauge

Radial Gauge

Targets

When the Value Type of the gauge is set to target you need to provide information for a target to call. This target must return a singular numeric value, if a single numeric value is not returned and cannot be parsed as a Double, the gauge will fail to load.

Component Code

The first section of the component contains all the variables needed for the component to function.

OnParametersSetAsync()

This method is called when the component is first loaded and anytime there’s an update to its parent component. This methods purpose is to pull and assign values to the various variables for the component from data in the FieldDefinition parameter, a call to GetGaugeData() is also made.

SetupAutoRefreshTimer()

This method is called when data auto refresh is enabled and will configure a timer to refresh the data.

IDisposable.Dispose()

This method is called when the component is disposed to additionally dispose the auto refresh timer.

GetGaugeData()

This method is used to get the current value of the gauge from the desired Value Type specified in the field definition.

  • Static – The value is pulled directly from the field definition.
  • XML Element – The value is pulled from the Instance Data from the selected XML Element.
  • Target – The value is returned from the target specified in the field definition.

A call to GetGaugeColourRanges() is also made.

GetGaugeColourRanges()

This method is used to get any colour ranges specified in the field definition for the gauge when the gauge type is Radial or Linear. A call to the TSQL Stored Procedure GI_GetGaugeColourRanges is made and returns any color ranges for the gauge.

Updated on November 13, 2023

Was this article helpful?

Related Articles

Need Support?
Can’t find the answer you’re looking for? Don’t worry we’re here to help!
Contact Support

Leave a Comment