Skip to content

Gauge Model

Properties

dataStore

Type: any

Description: Data store object that can be used to store any data needed for the chart.
Default: {}

setupFinished

Type: Promise

Description: Promise that resolves when the setup process is complete.
Note: This promise does not need to be awaited if the setup method has already been awaited. It is simply provided as a way to await the setup process from other functions if needed to avoid race conditions.
Default: ...

aggregationType

Type: WebChartStatisticType

Description: Aggregation type used for the gauge.

Must be one of the values allowed by WebChartStatisticType, excluding "no_aggregation".

axisLabelsSymbol

Type: undefined | WebChartTextSymbol

Description: Axis labels text symbol (font, color, style).

axisLinesSymbol

Type: undefined | ISimpleLineSymbol

Description: Axis lines symbol (line width, style, color).

axisTickVisibility

Type: boolean

Description: Whether axis ticks are visible.

backgroundColor

Type: undefined | Color

Description: The background color of the chart.

chartId

Type: undefined | string

Description: The chart ID.

chartRenderer

Type: any

Description: The chart renderer.

chartSubtitleVisibility

Type: boolean

Description: Whether or not the chart subtitle is visible.
true: Chart subtitle is visible.
false: Chart subtitle is hidden.
Note: Even if the subtitle is visible, it may not be displayed if the subtitle text is empty.

chartSubType

Type: ChartSubType

Description: The chart sub type of the series.

chartTitleVisibility

Type: boolean

Description: Whether or not the chart title is visible.
true: Chart title is visible.
false: Chart title is hidden.
Note: Even if the title is visible, it may not be displayed if the title text is empty.

chartType

Type: ChartTypes

Description: The chart type.

config

Type: ChartConfig

Description: The current chart configuration object.

descriptionSymbol

Type: undefined | WebChartTextSymbol

Description: The description text symbol. Contains styling information such as font, color, and symbol style.

descriptionText

Type: string

Description: The chart description text.

descriptionVisibility

Type: boolean

Description: Whether or not the chart description is visible.
true: Description is visible.
false: Description is hidden.
Note: Even if the description is visible, it may not be displayed if the description text is empty.

endAngle

Type: number

Description: End angle of the gauge.

featureIndex

Type: undefined | null | number

Description: Gets the index of the feature to be rendered.

fetchNULLValues

Type: boolean

Description: Whether to fetch null values for them to be counted or displayed as categories on the chart.

field

Type: string

Description: Data field used for the gauge.

gaugeSubType

Type: GaugeChartSubTypes

Description: Type of Gauge chart, like FeatureGauge and StatisticGauge.

guideLabelsSymbol

Type: undefined | WebChartTextSymbol

Description: The guide labels text symbol (font, color, style).

innerLabelContent

Type: undefined | WebChartTextSymbol

Description: Content symbol for the inner label.

innerLabelVisible

Type: boolean

Description: Whether the inner label is visible.

innerRadius

Type: number

Description: Inner radius of the gauge.

labelsIncrement

Type: undefined | number

Description: Labels increment for the gauge.

layer

Type: undefined | SupportedLayer

Description: The associated layer.

maxXBound

Type: null | number

Description: Maximum bound set for the x-axis. Null indicates no explicit maximum.

minXBound

Type: null | number

Description: Minimum bound set for the x-axis. Null indicates no explicit minimum.

needleDisplayPin

Type: boolean

Description: Whether to display the pin for the gauge's needle.

needleEndWidth

Type: undefined | null | number

Description: End width of the gauge's needle.

needleInnerRadius

Type: undefined | null | number

Description: Inner radius of the gauge's needle.

needleStartWidth

Type: undefined | null | number

Description: Start width of the gauge's needle.

needleSymbol

Type: undefined | ISimpleFillSymbol

Description: Symbol of the gauge's needle.

needleVisibility

Type: boolean

Description: Visibility of the gauge's needle.

onlyShowFirstAndLastLabels

Type: boolean

Description: Whether to only show the first and last axis labels.

seriesLength

Type: number

Description: The length of the series array.

splitByValues

Type: string[]

Description: The split-by values for the chart.

startAngle

Type: number

Description: Start angle of the gauge.

subtitleSymbol

Type: undefined | WebChartTextSymbol

Description: The subtitle text symbol. Contains styling information such as font, color, and symbol style.

subtitleText

Type: string

Description: The chart subtitle text.

titleSymbol

Type: undefined | WebChartTextSymbol

Description: The title text symbol. Contains styling information such as font, color, and symbol style.

titleText

Type: string

Description: The chart title text.

valueConversion

Type: undefined | ValueConversion

Description: Conversion to apply to the gauge value.

version

Type: undefined | string

Description: The version of the chart configuration.

xAxisTitleSymbol

Type: undefined | WebChartTextSymbol

Description: X-axis title text symbol (font, color, style).

xAxisTitleText

Type: string

Description: The x-axis title text.

xAxisTitleVisibility

Type: boolean

Description: Whether the x-axis title is visible.
true: X-axis title is visible.
false: X-axis title is hidden.

Methods

addXAxisGuide

Signature: addXAxisGuide(name: string, index: number): void

Description: Adds an X-axis guide.

Parameters:

  • name: string – The name of the guide.
  • Optional index: number – The index to insert the new guide in the list of X-axis guides. If left undefined, the guide is appended to the end of the list.

Returns: void

deleteXAxisGuide

Signature: deleteXAxisGuide(index: number): void

Description: Deletes an X-axis guide.

Parameters:

  • Optional index: number – The index of the guide to delete in the list of X-axis guides. If left undefined, the last guide in the list is deleted.

Returns: void

generateChartTitle

Signature: generateChartTitle(): string

Description: Generate the proper chart title given the current config.

Returns: string

generateXAxisTitle

Signature: generateXAxisTitle(): string

Description: Generate the proper x-axis title from the current config.

Returns: string

getDataFilters

Signature: getDataFilters(): undefined | WebChartDataFilters

Description: Gets the data filter for the bar chart.

Returns: undefined | WebChartDataFilters

getDataTooltipValueFormat

Signature: getDataTooltipValueFormat(seriesIndex: number): undefined | NumberFormatOptions

Description: Gets the data tooltip value format for a series.

If the series index is out of bounds or the series list is empty, this function will return undefined.

Parameters:

  • seriesIndex: number – The index of the series to retrieve the value format for.

Returns: undefined | NumberFormatOptions

getGuideAbove

Signature: getGuideAbove(index: number, orientation: GuideOrientation): boolean

Description: Gets whether the guide should be rendered above the other chart elements.

Parameters:

  • Optional index: number – Default 0. The index of the guide in the list of guides for the given axis orientation.
  • Optional orientation: GuideOrientation – Default y. The axis orientation of the guide.

Returns: boolean

getGuideEnd

Signature: getGuideEnd(index: number, orientation: GuideOrientation): undefined | null | string | number | Date

Description: Gets the end value of a guide.

Parameters:

  • Optional index: number – Default 0. The index of the guide in the list of guides for the given axis orientation.
  • Optional orientation: GuideOrientation – Default y. The axis orientation of the guide.

Returns: undefined | null | string | number | Date

getGuideLabelText

Signature: getGuideLabelText(index: number, orientation: GuideOrientation): undefined | string

Description: Gets the guide label text.

Parameters:

  • Optional index: number – Default 0. The index of the guide in the list of guides for the given axis orientation.
  • Optional orientation: GuideOrientation – Default y. The axis orientation of the guide.

Returns: undefined | string

getGuideName

Signature: getGuideName(index: number, orientation: GuideOrientation): undefined | string

Description: Gets the name of a guide.

Parameters:

  • Optional index: number – Default 0. The index of the guide in the list of guides for the given axis orientation.
  • Optional orientation: GuideOrientation – Default y. The axis orientation of the guide.

Returns: undefined | string

getGuideStart

Signature: getGuideStart(index: number, orientation: GuideOrientation): null | string | number | Date

Description: Gets the start value of a guide.

Parameters:

  • Optional index: number – Default 0. The index of the guide in the list of guides for the given axis orientation.
  • Optional orientation: GuideOrientation – Default y. The axis orientation of the guide.

Returns: null | string | number | Date

getGuideStyle

Signature: getGuideStyle(index: number, orientation: GuideOrientation): undefined | ISimpleLineSymbol | ISimpleFillSymbol

Description: Gets the guide style.

Parameters:

  • Optional index: number – Default 0. The index of the guide in the list of guides for the given axis orientation.
  • Optional orientation: GuideOrientation – Default y. The axis orientation of the guide.

Returns: undefined | ISimpleLineSymbol | ISimpleFillSymbol

getGuideVisibility

Signature: getGuideVisibility(index: number, orientation: GuideOrientation): boolean

Description: Gets whether a guide is visible.

Parameters:

  • Optional index: number – Default 0. The index of the guide in the list of guides for the given axis orientation.
  • Optional orientation: GuideOrientation – Default y. The axis orientation of the guide.

Returns: boolean

getSeriesId

Signature: getSeriesId(seriesIndex: number): undefined | string

Description: Gets the series ID for a given series index.

If the series index is out of bounds, this function will return undefined.

Parameters:

  • seriesIndex: number – The index of the series.

Returns: undefined | string

getSeriesIndex

Signature: getSeriesIndex(seriesId: string): undefined | number

Description: Gets the series index for a given series ID.

If the series ID is not found, this function will return undefined.

Parameters:

  • seriesId: string – No description.

Returns: undefined | number

getSeriesVisibility

Signature: getSeriesVisibility(seriesIndex: number): boolean

Description: Gets the visibility of a series.

Parameters:

  • seriesIndex: number – The series index

Returns: boolean

getTooltipReverseColor

Signature: getTooltipReverseColor(index: number, orientation: GuideOrientation): boolean

Description: Gets whether the tooltip text color should be reversed for a guide.

Parameters:

  • index: number – The index of the guide in the list of guides for the given axis orientation.
  • Optional orientation: GuideOrientation – The axis orientation of the guide.

Returns: boolean

getXGuidesLength

Signature: getXGuidesLength(): undefined | number

Description: Gets the number guides in the X-axis guides list.

Returns: undefined | number

isSameChartAs

Signature: isSameChartAs(otherModel: undefined | ChartModel): boolean

Description: Checks if the current chart model is for the same chart as another chart model.

Parameters:

  • otherModel: undefined | ChartModel – The other chart model to compare to.

Returns: boolean

removeFeatureIndex

Signature: removeFeatureIndex(): void

Description: Removes the existing feature index from the config object

Returns: void

setDataFilters

Signature: setDataFilters(newDataFilters: undefined | WebChartDataFilters): Promise

Description: Shared method for all chart types.

Parameters:

  • newDataFilters: undefined | WebChartDataFilters – No description.

Returns: Promise

Async: This method is async and must be awaited.

setDataTooltipValueFormat

Signature: setDataTooltipValueFormat(seriesIndex: number, valueFormat: undefined | NumberFormatOptions): void

Description: Sets the data tooltip value format for a series.

Parameters:

  • seriesIndex: number – The index of the series to set the value format for.
  • valueFormat: undefined | NumberFormatOptions – The value format to set.

Returns: void

setGuideAbove

Signature: setGuideAbove(above: boolean, index: number, orientation: GuideOrientation): void

Description: Sets whether the guide should be rendered above the other chart elements.

Parameters:

  • above: boolean – New above boolean to set.
  • Optional index: number – Default 0. The index of the guide in the list of guides for the given axis orientation.
  • Optional orientation: GuideOrientation – Default y. The axis orientation of the guide.

Returns: void

setGuideEnd

Signature: setGuideEnd(end: undefined | null | string | number | Date, index: number, orientation: GuideOrientation): void

Description: Sets the end value of a guide.

Parameters:

  • end: undefined | null | string | number | Date – New end value to set.
  • Optional index: number – Default 0. The index of the guide in the list of guides for the given axis orientation.
  • Optional orientation: GuideOrientation – Default y. The axis orientation of the guide.

Returns: void

setGuideLabelText

Signature: setGuideLabelText(labelText: string, index: number, orientation: GuideOrientation): void

Description: Sets the guide label text.

Parameters:

  • labelText: string – New label text to set.
  • Optional index: number – Default 0. The index of the guide in the list of guides for the given axis orientation.
  • Optional orientation: GuideOrientation – Default y. The axis orientation of the guide.

Returns: void

setGuideName

Signature: setGuideName(name: string, index: number, orientation: GuideOrientation): void

Description: Sets the name of a guide.

Parameters:

  • name: string – New name to set.
  • Optional index: number – Default 0. The index of the guide in the list of guides for the given axis orientation.
  • Optional orientation: GuideOrientation – Default y. The axis orientation of the guide.

Returns: void

setGuideStart

Signature: setGuideStart(start: null | string | number | Date, index: number, orientation: GuideOrientation): void

Description: Sets the start value of a guide.

Parameters:

  • start: null | string | number | Date – New start value to set.
  • Optional index: number – Default 0. The index of the guide in the list of guides for the given axis orientation.
  • Optional orientation: GuideOrientation – Default y. The axis orientation of the guide.

Returns: void

setGuideStyle

Signature: setGuideStyle(style: ISimpleLineSymbol | ISimpleFillSymbol, index: number, orientation: GuideOrientation): void

Description: Sets the guide style.

Parameters:

  • style: ISimpleLineSymbol | ISimpleFillSymbol – New style to set.
  • Optional index: number – Default 0. The index of the guide in the list of guides for the given axis orientation.
  • Optional orientation: GuideOrientation – Default y. The axis orientation of the guide.

Returns: void

setGuideVisibility

Signature: setGuideVisibility(visible: boolean, index: number, orientation: GuideOrientation): void

Description: Sets whether a guide is visible

Parameters:

  • visible: boolean – New visibility to set.
  • Optional index: number – Default 0. The index of the guide in the list of guides for the given axis orientation.
  • Optional orientation: GuideOrientation – Default y. The axis orientation of the guide.

Returns: void

setSeriesVisibility

Signature: setSeriesVisibility(props: LegendItemVisibility): void

Description: Sets the visibility of a series.

Parameters:

  • props: LegendItemVisibility – No description.

Returns: void

setTooltipReverseColor

Signature: setTooltipReverseColor(reverseColor: boolean, index: number, orientation: GuideOrientation): void

Description: Sets whether the tooltip text color should be reversed for a guide.

Parameters:

  • reverseColor: boolean – New reverseColor boolean to set.
  • index: number – The index of the guide in the list of guides for the given axis orientation.
  • Optional orientation: GuideOrientation – The axis orientation of the guide.

Returns: void

setup

Signature: setup(params: ModelParams): Promise

Description: Completes the async setup process for the chart model. Must be called before using the model.

Parameters:

  • params: ModelParams – The parameters to be used to set up the chart model.

Returns: Promise

Async: This method is async and must be awaited.

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.