JavaScript/jQuery Chart - valueAxis.minVisualRangeLength

Specifies the minimum length of the visual range.

Type:

Number

|

Object

|

String

Default Value: undefined
Accepted Values: 'day' | 'hour' | 'millisecond' | 'minute' | 'month' | 'quarter' | 'second' | 'week' | 'year'
Cannot be used in themes.

If the visual range is set on a numeric axis, assign a number to this option. If the axis displays date-time values, assign one of the accepted string values or an object to this option. The object should contain one or several fields described in this section, for example:

jQuery
index.js
$(function() {
    $("#chartContainer").dxChart({
        // ...
        valueAxis: {
            // ...
            minVisualRangeLength: { weeks: 2 }
        }
    });
});
Angular
app.component.html
app.component.ts
app.module.ts
<dx-chart ... >
    <dxi-value-axis ... >
        <dxo-min-visual-range-length [weeks]="2"></dxo-min-visual-range-length>
    </dxi-value-axis>
</dx-chart>
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 { DxChartModule } from 'devextreme-angular';

@NgModule({
    declarations: [
        AppComponent
    ],
    imports: [
        BrowserModule,
        DxChartModule
    ],
    providers: [ ],
    bootstrap: [AppComponent]
})
export class AppModule { }
Vue
DxComponent.vue
App.vue
<template>
    <dx-chart ... >
        <dx-value-axis ... >
            <dx-min-visual-range-length :weeks="2" />
        </dx-value-axis>
    </dx-chart>
</template>

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

import DxChart, {
    DxValueAxis,
    DxMinVisualRangeLength
} from 'devextreme-vue/chart';

export default {
    components: {
        DxChart,
        DxValueAxis,
        DxMinVisualRangeLength
    },
    data() {
        return {
            // ...
        }
    },
}
</script>
<template>
    <dx-component />
</template>
<script>
import DxComponent from './components/DxComponent';

export default {
    components: {
        DxComponent
    }
}
</script>
React
DxComponent.js
App.js
import React from 'react';
import 'devextreme/dist/css/dx.common.css';
import 'devextreme/dist/css/dx.light.css';
import Chart, {
    ValueAxis,
    MinVisualRangeLength
} from 'devextreme-react/chart';

class DxComponent extends React.Component {
    render() {
        return (
            <Chart ... >
                <ValueAxis ... >
                    <MinVisualRangeLength weeks={2} />
                </ValueAxis>
            </Chart>
        );
    }
}
export default DxComponent;
import React, { Component } from 'react';
import './App.css';
import DxComponent from './DxComponent';

class App extends Component {
    render() {
        return (
            <div>
                <DxComponent />
            </div>
        );
    }
}
export default App;

When you use the widget as an ASP.NET MVC Control, specify this option via the VizTimeInterval enum. This enum accepts the same values, but they start with an upper-case letter, for example, 'day' becomes Day.

See Also

days

Specifies the time interval measured in days. Available only for an axis/scale displaying date-time values.

Type:

Number

hours

Specifies the time interval measured in hours. Available only for an axis/scale displaying date-time values.

Type:

Number

milliseconds

Specifies the time interval measured in milliseconds. Available only for an axis/scale displaying date-time values.

Type:

Number

minutes

Specifies the time interval measured in minutes. Available only for an axis/scale displaying date-time values.

Type:

Number

months

Specifies the time interval measured in months. Available only for an axis/scale displaying date-time values.

Type:

Number

quarters

Specifies the time interval measured in quarters. Available only for an axis/scale displaying date-time values.

Type:

Number

seconds

Specifies the time interval measured in seconds. Available only for an axis/scale displaying date-time values.

Type:

Number

weeks

Specifies the time interval measured in weeks. Available only for an axis/scale displaying date-time values.

Type:

Number

years

Specifies the time interval measured in years. Available only for an axis/scale displaying date-time values.

Type:

Number