JavaScript/jQuery CircularGauge - valueIndicator

Specifies the appearance properties of the value indicator.

Type:

Object

The value indicator is a pointer which designates the main value of the gauge. There are several types of value indicators. Set the required one by using the type property, and then specify the properties that are specific to this type, if needed. To learn the properties that can be specified for a particular type, refer to one of the following sections.

View Demo

arrowLength

Specifies the length of an arrow for the indicator of the textCloud type in pixels.

Type:

Number

Default Value: 5
This member is exposed by the following entities:

backgroundColor

Specifies the background color for the indicator of the rangeBar type.

Type:

String

Default Value: 'none'
This member is exposed by the following entities:

This property supports the following colors:

baseValue

Specifies the base value for the indicator of the rangeBar type.

Type:

Number

Default Value: undefined
This member is exposed by the following entities:
Cannot be used in themes.

By default, a range bar starts from the beginning of the gauge scale. If you need to draw the range bar starting from a specific scale value, assign the required value to the baseValue property. In this instance, the range bar will display the range from the baseValue to the main gauge value.

View Demo

beginAdaptingAtRadius

Specifies a radius small enough for the indicator to begin adapting.

Type:

Number

Default Value: 50
This member is exposed by the following entities:

When adapting, the indicator adjusts its parts and surroundings proportionally to the changing UI component size. The adjustments affect the incidator's indent from the center, the offset from the scale, and the spindle's size and gap.

color

Specifies the color of the indicator.

This property supports the following colors:

You can also specify a custom pattern or gradient instead of a plain color. Call the registerPattern() or registerGradient() method to obtain a fill ID. Assign that value to the fillId field.

jQuery
index.js
$(function(){
    $("#circularGaugeContainer").dxCircularGauge({
        // ...
        valueIndicator: {
            // ...
            color: {
                fillId: customPatternId
            }
        }
    });
});
Angular
app.component.html
app.component.ts
<dx-circular-gauge ... >
    <dxo-value-indicator [color]="fill">
    </dxo-value-indicator>
</dx-circular-gauge>
// ...

export class AppComponent {
    // ...

    fill = {
        fillId: this.customPatternId
    };
} 
Vue
App.vue (Options API)
App.vue (Composition API)
<template>
    <DxCircularGauge ... >
        <DxValueIndicator
            :color="fill"
        />
    </DxCircularGauge>
</template>

<script>
import DxCircularGauge, { DxValueIndicator } from 'devextreme-vue/circular-gauge'; 
// ...

export default {
    components: {
        DxCircularGauge,
        DxValueIndicator
    },
    data() {
        return {
            // ...
            fill: {
                fillId: this.customPatternId
            }
        }
    }
}
</script>
<template>
    <DxCircularGauge ... >
        <DxValueIndicator
            :color="fill"
        />
    </DxCircularGauge>
</template>

<script setup>
import DxCircularGauge, { DxValueIndicator } from 'devextreme-vue/circular-gauge'; 
// ...

const fill = {
    fillId: customPatternId
};
</script>
React
App.js
import React from 'react';
import CircularGauge, { ValueIndicator } from 'devextreme-react/circular-gauge';

// ...
const fill = {
    fillId: customPatternId
};

export default function App() { 
    return ( 
        <CircularGauge ... >
            <ValueIndicator color={fill} />
        </CircularGauge>        
    ); 
} 

horizontalOrientation

Specifies the orientation of the rangeBar indicator. Applies only if the geometry.orientation property is "vertical".

Default Value: 'left' (subvalue indicators), 'right' (value indicators)
This member is exposed by the following entities:

This property specifies the orientation of the indicator relative to an invisible scale line.

indentFromCenter

Specifies the distance between the needle and the center of a gauge for the indicator of a needle-like type.

Type:

Number

Default Value: 0
This member is exposed by the following entities:

length

Specifies the indicator length.

Type:

Number

Default Value: 15
This member is exposed by the following entities:

offset

Specifies the distance between the indicator and the invisible scale line.

Type:

Number

secondColor

Specifies the second color for the indicator of the twoColorNeedle type.

Type:

String

Default Value: '#E18E92'
This member is exposed by the following entities:

When you use a twoColorNeedle indicator, define the colors for it using the color and secondColor properties. The color property sets the color for the base of the needle. The secondColor property sets the color for the tip of the needle.

This property supports the following colors:

In addition, you can specify the ratio between the main and the second color using the secondFraction property.

secondFraction

Specifies the length of a twoNeedleColor type indicator tip as a percentage.

Type:

Number

Default Value: 0.4
This member is exposed by the following entities:

size

Specifies the range bar size for an indicator of the rangeBar type.

Type:

Number

Default Value: 10
This member is exposed by the following entities:

spindleGapSize

Specifies the inner diameter in pixels, so that the spindle has the shape of a ring.

Type:

Number

Default Value: 10
This member is exposed by the following entities:

Set this property to 0 so that the spindle has the shape of a circle.

spindleSize

Specifies the spindle's diameter in pixels for the indicator of a needle-like type.

Type:

Number

Default Value: 14
This member is exposed by the following entities:

text

Specifies the appearance of the text displayed in an indicator of the rangeBar type.

Type:

Object

This member is exposed by the following entities:

Note that the indent property of the text configuration object must not be set to 0 if you need to show the text.

type

Specifies the value indicator type.

Type:

String

Default Value: 'rectangleNeedle'
Accepted Values: 'rectangleNeedle' | 'triangleNeedle' | 'twoColorNeedle' | 'rangeBar' | 'triangleMarker' | 'textCloud'

Different properties of the valueIndicator configuration object can be set for different types of the value indicator. These properties are listed within the Indicator Types section.

View Demo

verticalOrientation

Specifies the orientation of the rangeBar indicator. Applies only if the geometry.orientation property is "horizontal".

Type:

VerticalEdge

Default Value: 'bottom' (value indicators), 'top' (subvalue indicators)
This member is exposed by the following entities:

This property specifies the orientation of an indicator relative to an invisible scale line.

width

Specifies the width of an indicator in pixels.

Type:

Number

Default Value: 2
This member is exposed by the following entities: