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

You can create the widget using one of the following approaches.

  • jQuery

    HTML
    JavaScript
    <div id="polarChart"></div>
    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" }
            ]
        });
    });
  • Angular

    HTML
    JavaScript
    <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>
    export class AppComponent {
        temperature = [
            // ...   
        ];
    }
  • 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 = [
                // ...   
            ];
        });
  • 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: [
            // ...
        ]
    };
    ko.applyBindings(viewModel);
  • ASP.NET MVC Wrappers

    Razor C#
    Razor VB
    @(Html.DevExtreme().PolarChart()
        .ID("polarChart")
        .DataSource(Temperature)
        .CommonSeriesSettings(c => c
            .ArgumentField("month")
            .Type(PolarChartSeriesType.Scatter)
        )
        .Series(series => {
            series.Add().ValueField("day");
            series.Add().ValueField("night");
        })
    )
    @(Html.DevExtreme().PolarChart() _
        .ID("polarChart") _
        .DataSource(Temperature) _
        .CommonSeriesSettings(Sub(c)
            c.ArgumentField("month") _
             .Type(PolarChartSeriesType.Scatter)
        End Sub) _
        .Series(Sub(series)
            series.Add().ValueField("day")
            series.Add().ValueField("night")
        End Sub)
    )

Note that DevExtreme widgets require you to link the jQuery library to your application. If you use the Knockout or AngularJS approach, the Knockout or AngularJS library is also required. For detailed information on linking these libraries to your project, refer to the topics in the Installation section.

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 PolarChart widget.

Use the dxPolarChart registered method to access the PolarChart widget as demonstrated in the code below.

JavaScript
var chart = $("#chartContainer").dxPolarChart("instance");

Events

This section describes events fired by this widget.

Series Types

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

Chart Elements

This section lists the methods and fields of chart elements.