React 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.

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.

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