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 - Periodic Data

This example illustrates the visualization of periodic data. To notify the component that data is periodic, the period property of the argumentAxis is specified.

Backend API
<dx-polar-chart id="chart" title="Archimedean Spiral" [dataSource]="coordinates" > <dxi-polar-chart-series type="line" name="Function" [closed]="false" ></dxi-polar-chart-series> <dxo-polar-chart-argument-axis [inverted]="true" [startAngle]="90" [tickInterval]="45" [period]="360" > </dxo-polar-chart-argument-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: 720, val: 2, }]; @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>