PolarChart

A chart widget displaying data in a polar coordinate system.

The dxPolarChart widget is used to display polar charts in web applications. These charts are displayed in a polar coordinate system. In this system, each point on a plane is determined by a distance from a fixed point (the point's value) and an 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 imagination.

DevExtreme HTML5 Charts DataVisualization DevExtreme HTML5 Charts PolarChart RadarChart DataVisualization

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

  • jQuery
    Use the dxPolarChart jQuery plug-in.

    HTML
    <div id="chartContainer"></div>
    JavaScript
    $("#chartContainer").dxPolarChart({
        dataSource: dataSource,
        series: [
            {valueField: "day", name: "Day" }, 
            { valueField: "night", name: "Night" }
        ],
        commonSeriesSettings: {     
            argumentField: "month",
            type: "scatter"
        }
    });
  • Knockout
    Add a div element and apply the dxPolarChart binding to this element.

    HTML
    <div data-bind="dxPolarChart: {
        dataSource: dataSource,
        series: [
            {valueField: 'day', name: 'Day' }, 
            { valueField: 'night', name: 'Night' }
        ],
        commonSeriesSettings: {     
            argumentField: 'month',
            type: 'scatter'
        }
    }"></div>
  • Angular
    Add a div element and apply the dx-polar-chart directive to this element.

    HTML
    <div dx-polar-chart="{
        dataSource: dataSource,
        series: [
            {valueField: 'day', name: 'Day' }, 
            { valueField: 'night', name: 'Night' }
        ],
        commonSeriesSettings: {     
            argumentField: 'month',
            type: 'scatter'
        }
    }"></div>

Note that DevExtreme widgets require you to link the jQuery and Globalize libraries to your application. If you use the Knockout or Angular approach, the Knockout or Angular library is also required.

See Also

The dxPolarChart widget contains multiple visual elements (axes, titles, labels, strips, grid, etc.). To learn more about the widget's visual elements, refer to the PolarChart Elements help article. To learn how to provide data for the dxPolarChart widget, refer to the Data Binding article.

Choose one of the following supported series types.

You can read an overview of these series types in the PolarChart Series Types article.

View Demo Watch Video

See Also

To learn about the widget's concepts and overview features, refer to the Charts section within the Data Visualization Guides.

Configuration

An object defining configuration options for the dxPolarChart widget.

Name Description
adaptiveLayout

Specifies adaptive layout options.

animation

Specifies animation options.

argumentAxis

Specifies argument axis options for the dxPolarChart widget.

commonAxisSettings

An object defining the configuration options that are common for all axes of the dxPolarChart widget.

commonSeriesSettings

An object defining the configuration options that are common for all series of the dxPolarChart widget.

containerBackgroundColor

Specifies the color of the parent page element.

customizeLabel

Specifies a callback function that returns an object with options for a specific point label.

customizePoint

Specifies a callback function that returns an object with options for a specific point.

dataPrepareSettings

An object providing options for managing data from a data source.

dataSource

Specifies a data source for the chart.

equalBarWidth

Specifies a value indicating whether all bars in a series must have the same angle, or may have different angles if any points in other series are missing.

legend

Specifies the options of a chart's legend.

loadingIndicator

Specifies the appearance of the loading indicator.

margin

Specifies the blank space between the chart's extreme elements and the boundaries of the area provided for the widget (see size) in pixels.

onArgumentAxisClick

A handler for the argumentAxisClick event.

onDisposing

A handler for the disposing event.

onDone

A handler for the done event.

onDrawn

A handler for the drawn event.

onIncidentOccurred

A handler for the incidentOccurred event.

onInitialized

A handler for the initialized event.

onLegendClick

A handler for the legendClick event.

onOptionChanged

A handler for the optionChanged event.

onPointClick

A handler for the pointClick event.

onPointHoverChanged

A handler for the pointHoverChanged event.

onPointSelectionChanged

A handler for the pointSelectionChanged event.

onSeriesClick

A handler for the seriesClick event.

onSeriesHoverChanged

A handler for the seriesHoverChanged event.

onSeriesSelectionChanged

A handler for the seriesSelectionChanged event.

onTooltipHidden

A handler for the tooltipHidden event.

onTooltipShown

A handler for the tooltipShown event.

palette

Sets the name of the palette to be used in the chart. Alternatively, an array of colors can be set as a custom palette to be used within this chart.

pathModified

Notifies a widget that it is embedded into an HTML page that uses a path modifier.

pointSelectionMode

Specifies whether a single point or multiple points can be selected in the chart.

redrawOnResize

Specifies whether to redraw the widget when the size of the parent browser window changes or a mobile device rotates.

resolveLabelOverlapping

Specifies how the chart must behave when series point labels overlap.

rtlEnabled

Specifies whether or not the widget supports right-to-left representation.

series

Specifies options for dxPolarChart widget series.

seriesSelectionMode

Specifies whether a single series or multiple series can be selected in the chart.

seriesTemplate

Defines options for the series template.

size

Specifies the size of the widget in pixels.

theme

Sets the name of the theme to be used in the widget.

title

Specifies a title for the chart.

tooltip

Specifies tooltip options.

useSpiderWeb

Indicates whether or not to display a "spider web".

valueAxis

Specifies value axis options for the dxPolarChart widget.

Methods

This section describes the methods that can be used in code to manipulate the dxPolarChart object.

Name Description
beginUpdate()

Prevents the component from refreshing until the endUpdate method is called.

clearSelection()

Deselects the chart's selected series. The series is displayed in an initial style.

element()

Returns the root HTML element of the widget.

endUpdate()

Enables the component to refresh after the beginUpdate method call.

getAllSeries()

Returns an array of all series in the chart.

getSeriesByName(seriesName)

Gets a series within the chart's series collection by the specified name (see the name option).

getSeriesByPos(seriesIndex)

Gets a series within the chart's series collection by its position number.

getSize()

Gets the current size of the widget.

hideLoadingIndicator()

Conceals the loading indicator.

hideTooltip()

Hides all widget tooltips.

instance()

Returns an instance of this component class.

off(eventName)

Detaches all event handlers from the specified event.

off(eventName, eventHandler)

Detaches a particular event handler from the specified event.

on(eventName, eventHandler)

Subscribes to a specified event.

on(events)

Subscribes to the specified events.

option()

Returns the configuration options of this component.

option(optionName)

Gets the value of the specified configuration option of this component.

option(optionName, optionValue)

Sets a value to the specified configuration option of this component.

option(options)

Sets one or more options of this component.

render(renderOptions)

Redraws a widget.

showLoadingIndicator()

Displays the loading indicator.

svg()

Returns the widget's SVG markup.

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

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

Events

This section describes events exposed by this widget.

Name Description
argumentAxisClick

Fires when a user clicks a label on the argument axis.

disposing

Fires when the widget is being removed.

done

Fires when the Series and Point chart elements are ready to be accessed.

drawn

Fires when the widget has finished drawing itself.

incidentOccurred

Fires when an error or warning appears in a widget.

initialized

Fires when the widget is initialized.

legendClick

Fires when an item on the chart legend is clicked.

optionChanged

Fires after an option of the component is changed.

pointClick

Fires when a user clicks a series point.

pointHoverChanged

Fires when the hover state of a series point has been changed.

pointSelectionChanged

Fires when the selection state of a series point has been changed.

seriesClick

Fires when a user clicks a series.

seriesHoverChanged

Fires when the hover state of a series has been changed.

seriesSelectionChanged

Fires when the selection state of a series has been changed.

tooltipHidden

Fires when a point's tooltip becomes hidden.

tooltipShown

Fires when a point's tooltip appears.

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.