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

jQuery Chart - Rotate and Invert the Chart

When the Chart is rotated, its axes are swapped around.

DevExtreme HTML5 JavaScript Charts DevExtreme HTML5 JavaScript Charts RotatedChart

To rotate the Chart, set the rotated property to true.

jQuery
JavaScript
$(function() {
    $("#chartContainer").dxChart({
        // ...
        rotated: true
    });
});
Angular
HTML
TypeScript
<dx-chart ...
    [rotated]="true">
</dx-chart>
import { DxChartModule } from "devextreme-angular";
// ...
export class AppComponent {
    // ...
}
@NgModule({
    imports: [
        // ...
        DxChartModule
    ],
    // ...
})
Vue
App.vue
<template> 
    <DxChart
        :rotated="true"
        ...
    >
    </DxChart>
</template>

<script>
import DxChart from 'devextreme-vue/chart';

export default {
    components: {
        DxChart
    }
}
</script>
React
App.js
import React from 'react';
import Chart from 'devextreme-react/chart';

class App extends React.Component {
    render() {
        return (
            <Chart
                rotated={true}
                ...
            >
            </Chart>
        );
    }
}

export default App;

Besides being swapped around, chart axes can be inverted, or "mirrored".

DevExtreme HTML5 JavaScript Charts DevExtreme HTML5 JavaScript Charts InvertedArgumentAxis DevExtreme HTML5 JavaScript Charts InvertedValueAxis

To invert both argument and value axes, assign true to the inverted property of the commonAxisSettings object. The same property declared in the argumentAxis or valueAxis object inverts a specific axis.

jQuery
JavaScript
$(function() {
    $("#chartContainer").dxChart({
        // ...
        commonAxisSettings: {
            inverted: true
        },
        // or for a specific axis
        argumentAxis: {
            inverted: true
        },
        valueAxis: {
            inverted: true
        }
    });
});
Angular
HTML
TypeScript
<dx-chart ... >
    <dxo-common-axis-settings [inverted]="true"></dxo-common-axis-settings>
    <!-- or for a specific axis -->
    <dxo-argument-axis [inverted]="true"></dxo-argument-axis>
    <dxi-value-axis [inverted]="true"></dxi-value-axis>
</dx-chart>
import { DxChartModule } from "devextreme-angular";
// ...
export class AppComponent {
    // ...
}
@NgModule({
    imports: [
        // ...
        DxChartModule
    ],
    // ...
})
Vue
App.vue
<template> 
    <DxChart ... >
        <DxCommonAxisSettings :inverted="true"/>
        <!-- or for a specific axis -->
        <DxArgumentAxis :inverted="true"/>
        <DxValueAxis :inverted="true"/>
    </DxChart>
</template>

<script>
import DxChart, {
    DxCommonAxisSettings,
    DxArgumentAxis,
    DxValueAxis
} from 'devextreme-vue/chart';

export default {
    components: {
        DxChart,
        DxCommonAxisSettings,
        DxArgumentAxis,
        DxValueAxis
    }
}
</script>
React
App.js
import React from 'react';
import Chart, {
    CommonAxisSettings,
    ArgumentAxis,
    ValueAxis
} from 'devextreme-react/chart';

class App extends React.Component {
    render() {
        return (
            <Chart ... >
                <CommonAxisSettings inverted={true} />
                {/* or for a specific axis */}
                <ArgumentAxis inverted={true} />
                <ValueAxis inverted={true} />
            </Chart>
        );
    }
}

export default App;
See Also