PolarChart

The PolarChart is a widget that visualizes data in a polar coordinate system.

Included in: dx.viz.js, dx.viz-web.js, dx.all.js
Module: viz/polar_chart
Export: default
PolarChart interactive configuration
Copy Code
Copy to Codepen
$("#polarchart").dxPolarChart({
});

The PolarChart widget visualizes data in a polar coordinate system. In this system, each point on a plane is determined by the distance from the center (the point's value) and the angle from a fixed direction (the point's argument). To understand how a chart is displayed in a polar coordinate system, imagine how it would be displayed in a rectangular coordinate system and then round off the argument axis in your mind.

DevExtreme HTML5 Charts DataVisualization DevExtreme HTML5 Charts PolarChart RadarChart DataVisualization

DevExtreme widgets are integrated with many popular libraries and frameworks. See the Installation section (for JavaScript libraries) or the Prerequisites and Installation section (for ASP.NET MVC framework) to find details on setting up DevExtreme with a particular library or framework.

The following code shows how to create the PolarChart widget using every supported library and framework. For more details on working with widgets in these libraries and frameworks, see the Widget Basics topic for jQuery, Angular, AngularJS, Knockout or ASP.NET MVC.

jQuery
JavaScript
HTML
var temperature = [
    { month: "January", day: 6, night: 2 },
    { month: "February", day: 7, night: 2 },
    { month: "March", day: 10, night: 3 },
    { month: "April", day: 14, night: 5 },
    { month: "May", day: 18, night: 8 },
    { month: "June", day: 21, night: 11 },
    { month: "July", day: 22, night: 13 },
    { month: "August", day: 22, night: 13 },
    { month: "September", day: 19, night: 11 },
    { month: "October", day: 15, night: 8 },
    { month: "November", day: 10, night: 5 },
    { month: "December", day: 7, night: 3 }
];
$(function() {
    $("#polarChart").dxPolarChart({
        dataSource: temperature,
        commonSeriesSettings: {     
            argumentField: "month",
            type: "scatter"
        },
        series: [
            { valueField: "day", name: "Day" }, 
            { valueField: "night", name: "Night" }
        ]
    });
});
<div id="polarChart"></div>
Angular
HTML
TypeScript
<dx-polar-chart [dataSource]="temperature">
    <dxo-common-series-settings
        argumentField="month"
        type="scatter">
    </dxo-common-series-settings>
    <dxi-series
        valueField="day"
        name="Day">
    </dxi-series>
    <dxi-series
        valueField="night"
        name="Night">
    </dxi-series>
</dx-polar-chart>
import { DxPolarChartModule } from 'devextreme-angular';
// ...
export class AppComponent {
    temperature = [
        { month: "January", day: 6, night: 2 },
        { month: "February", day: 7, night: 2 },
        { month: "March", day: 10, night: 3 }
    ];
}
@NgModule({
    imports: [
        // ...
        DxPolarChartModule
    ],
    // ...
})
AngularJS
HTML
JavaScript
<div ng-controller="DemoController">
    <div dx-polar-chart="{
        dataSource: temperature,
        commonSeriesSettings: {     
            argumentField: 'month',
            type: 'scatter'
        },
        series: [
            { valueField: 'day', name: 'Day' }, 
            { valueField: 'night', name: 'Night' }
        ]
    }"></div>
</div>
angular.module('DemoApp', ['dx'])
    .controller("DemoController", function ($scope) {
        $scope.temperature = [
            { month: "January", day: 6, night: 2 },
            { month: "February", day: 7, night: 2 },
            { month: "March", day: 10, night: 3 }
        ];
    });
Knockout
HTML
JavaScript
<div data-bind="dxPolarChart: {
    dataSource: temperature,
    commonSeriesSettings: {     
        argumentField: 'month',
        type: 'scatter'
    },
    series: [
        { valueField: 'day', name: 'Day' }, 
        { valueField: 'night', name: 'Night' }
    ]
}"></div>
var viewModel = {
    temperature: [
        { month: "January", day: 6, night: 2 },
        { month: "February", day: 7, night: 2 },
        { month: "March", day: 10, night: 3 }
    ]
};
ko.applyBindings(viewModel);
ASP.NET MVC Controls
Razor C#
Razor VB
@(Html.DevExtreme().PolarChart()
    .ID("polarChart")
    .DataSource(new[] {
        new { Month = "January", Day = 6, Night = 2 },
        new { Month = "February", Day = 7, Night = 2 },
        new { Month = "March", Day = 10, Night = 3 }
    })
    .CommonSeriesSettings(c => c
        .ArgumentField("Month")
        .Type(PolarChartSeriesType.Scatter)
    )
    .Series(series => {
        series.Add().ValueField("Day");
        series.Add().ValueField("Night");
    })
)
@(Html.DevExtreme().PolarChart() _
    .ID("polarChart") _
    .DataSource({
        New With { .Month = "January", .Day = 6, .Night = 2 },
        New With { .Month = "February", .Day = 7, .Night = 2 },
        New With { .Month = "March", .Day = 10, .Night = 3 }
    }) _
    .CommonSeriesSettings(Sub(c)
        c.ArgumentField("Month") _
            .Type(PolarChartSeriesType.Scatter)
    End Sub) _
    .Series(Sub(series)
        series.Add().ValueField("Day")
        series.Add().ValueField("Night")
    End Sub)
)

View Demo Watch Video

See Also

Configuration

An object defining configuration options for the PolarChart widget.

Methods

This section describes the methods that can be used in code to manipulate the Chart widget.

Events

This section describes events fired by this widget.

See Also

Series Types

This section lists objects that define options used to configure series of specific types.

Type:

Object

Chart Elements

This section describes chart elements.