All docs
V19.2
24.1
The page you are viewing does not exist in version 24.1.
23.2
The page you are viewing does not exist in version 23.2.
23.1
The page you are viewing does not exist in version 23.1.
22.2
The page you are viewing does not exist in version 22.2.
22.1
The page you are viewing does not exist in version 22.1.
21.2
The page you are viewing does not exist in version 21.2.
21.1
The page you are viewing does not exist in version 21.1.
20.2
The page you are viewing does not exist in version 20.2.
20.1
The page you are viewing does not exist in version 20.1.
19.2
19.1
18.2
18.1
17.2
A newer version of this page is available. Switch to the current version.

jQuery BarGauge - animation

Specifies animation options.

Type:

Object

To make your gauge "live", enable animation for it by setting the enabled option of the animation object to true. In this instance, the gauge indicators will appear in motion. In addition, within the animation object, you can set an appropriate easing mode using the easing option and specify how long the animation should run using the duration option.

jQuery
index.js
$(function() {
    $("#barGaugeContainer").dxBarGauge({
        // ...
        animation: {
            easing: "linear",
            duration: 500
        }
    });
});
Angular
app.component.html
app.component.ts
app.module.ts
<dx-bar-gauge ... >
    <dxo-animation
        easing="linear"
        [duration]="500">
    </dxo-animation>
</dx-bar-gauge>
import { Component } from '@angular/core';

@Component({
    selector: 'app-root',
    templateUrl: './app.component.html',
    styleUrls: ['./app.component.css']
})
export class AppComponent {
    // ...
}
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AppComponent } from './app.component';

import { DxBarGaugeModule } from 'devextreme-angular';

@NgModule({
    declarations: [
        AppComponent
    ],
    imports: [
        BrowserModule,
        DxBarGaugeModule
    ],
    providers: [ ],
    bootstrap: [AppComponent]
})
export class AppModule { }
Vue
App.vue
<template>
    <DxBarGauge ... >
        <DxAnimation
            easing="linear"
            :duration="500"
        />
    </DxBarGauge>
</template>

<script>
import 'devextreme/dist/css/dx.common.css';
import 'devextreme/dist/css/dx.light.css';

import DxBarGauge, {
    DxAnimation
} from 'devextreme-vue/bar-gauge';

export default {
    components: {
        DxBarGauge,
        DxAnimation
    },
    // ...
}
</script>
React
App.js
import React from 'react';

import 'devextreme/dist/css/dx.common.css';
import 'devextreme/dist/css/dx.light.css';

import BarGauge, {
    Animation 
} from 'devextreme-react/bar-gauge';

class App extends React.Component {
    render() {
        return (
            <BarGauge ... >
                <Animation
                    easing="linear"
                    duration={500}
                />
            </BarGauge>
        );
    }
}
export default App;
ASP.NET MVC Controls
Razor C#
@(Html.DevExtreme().BarGauge()
    @* ... *@
    .Animation(a => a
        .Easing(VizAnimationEasing.Linear)
        .Duration(500)
    )
)

duration

Determines how long animation runs.

Type:

Number

Default Value: 1000

When animation is enabled for a gauge, you can specify how long the animation must run. To do this, set the animation.duration option to a numeric value in milliseconds. The bigger the value, the slower the animation.

easing

Specifies the animation easing mode.

Type:

String

Default Value: 'easeOutCubic'
Accepted Values: 'easeOutCubic' | 'linear'

The animation easing mode specifies the speed at which the animation progresses at different points within the animation. The following values are available.

  • easeOutCubic
    The animation progresses according to the Ease-out cubic interpolation function - quickly at the beginning and slowly at the end of the animation process.
  • linear
    The animation progresses at a constant pace.

Use the VizAnimationEasing enum to specify this option when the widget is used as an ASP.NET MVC 5 Control or a DevExtreme-Based ASP.NET Core Control. This enum accepts the following values: EaseOutCubic and Linear.

enabled

Indicates whether or not animation is enabled.

Type:

Boolean

Default Value: true

When this option is set to true, gauge indicators move smoothly to the specified values.