DevExtreme v26.1 is now available.

Explore our newest features/capabilities and share your thoughts with us.

Your search did not match any results.

Angular Charts - Inverted Chart

This example shows the PolarChart with inverted axes. You can specify the clockwise or counter-clockwise direction of the argumentAxis by using the inverted property. Similarly, you can change the direction of the valueAxis.

Backend API
<dx-polar-chart id="chart" title="Inverted Rose in Polar Coordinates" [dataSource]="coordinates" > <dxi-polar-chart-series type="area" name="Function"></dxi-polar-chart-series> <dxo-polar-chart-argument-axis [inverted]="true" [startAngle]="90" [tickInterval]="30" > </dxo-polar-chart-argument-axis> <dxo-polar-chart-value-axis [inverted]="true"></dxo-polar-chart-value-axis> <dxo-polar-chart-export [enabled]="true"></dxo-polar-chart-export> <dxo-polar-chart-legend [visible]="false"></dxo-polar-chart-legend> </dx-polar-chart>
import { bootstrapApplication } from '@angular/platform-browser'; import { Component, enableProdMode, provideZoneChangeDetection } from '@angular/core'; import { DxPolarChartModule } from 'devextreme-angular'; import { Coordinate, Service } from './app.service'; if (!/localhost/.test(document.location.host)) { enableProdMode(); } @Component({ selector: 'demo-app', templateUrl: './app.component.html', styleUrls: ['./app.component.css'], providers: [Service], imports: [ DxPolarChartModule, ], }) export class AppComponent { coordinates: Coordinate[]; constructor(service: Service) { this.coordinates = service.getCoordinates(); } } bootstrapApplication(AppComponent, { providers: [ provideZoneChangeDetection({ eventCoalescing: true, runCoalescing: true }), ], });
::ng-deep #chart { height: 440px; }
import { Injectable } from '@angular/core'; export class Coordinate { arg: number; val: number; } const coordinates: Coordinate[] = [{ arg: 0, val: 0, }, { arg: 30, val: 0.87, }, { arg: 45, val: 1, }, { arg: 60, val: 0.87, }, { arg: 90, val: 0, }, { arg: 120, val: 0.87, }, { arg: 135, val: 1, }, { arg: 150, val: 0.87, }, { arg: 180, val: 0, }, { arg: 210, val: 0.87, }, { arg: 225, val: 1, }, { arg: 240, val: 0.87, }, { arg: 270, val: 0, }, { arg: 300, val: 0.87, }, { arg: 315, val: 1, }, { arg: 330, val: 0.87, }, { arg: 360, val: 0, }]; @Injectable() export class Service { getCoordinates(): Coordinate[] { return coordinates; } }
<!DOCTYPE html> <html lang="en"> <head> <title>DevExtreme Demo</title> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=5.0" /> <link rel="stylesheet" type="text/css" href="https://cdn3.devexpress.com/jslib/26.1.5/css/dx.light.css" /> </head> <body class="dx-viewport"> <div class="demo-container"> <demo-app>Loading...</demo-app> </div> <script src="https://cdn.jsdelivr.net/npm/zone.js@0.16.2/bundles/zone.umd.js"></script> <script src="./bundle.js" type="module"></script> </body> </html>