JavaScript/jQuery PolarChart - BarSeries

An object defining a series of the bar type.

Type:

Object

All the settings in this section are specified as follows:

  • The commonSeriesSettings object
    Specifies settings for all series in a PolarChart.

  • The commonSeriesSettings.bar object
    Specifies settings for all series of the bar type.

  • An object in the series array
    Specifies settings for an individual series.

PolarBarSeriesType ChartJS

argumentField

Specifies the data source field that provides arguments for series points.

Type:

String

Default Value: 'arg'
Cannot be used in themes.

When defining series using the series configuration object, set the argumentField property to the corresponding field from the data source for each series individually. If the field that supplies arguments for data points is called in a similar way for several series, there is no need to set the field name for each series individually. Instead, set the field name for the argumentField property of the commonSeriesSettings configuration object at once.

barPadding

Controls the padding and consequently the angular width of all bars in a series using relative units. Ignored if the barWidth property is set.

Type:

Number

| undefined
Default Value: undefined

This property accepts a value from 0 to 1 that specifies the correlation between the empty space on a bar's sides and the bar's angular width: 0 - the bar occupies the whole allocated sector; 1 - virtually hides the bar leaving the whole sector empty.

See Also

barWidth

Specifies a fixed angular width for all bars in a series, measured in degrees. Takes precedence over the barPadding property.

Type:

Number

| undefined
Default Value: undefined

A bar's maximum width is limited. In single-series charts, it cannot be greater than the interval between two major ticks. In multi-series charts, it depends on the number of bars in the parent group and this group's actual width. See the Specify the Bar Width article for more information.

See Also

border

An object defining the series border configuration properties.

Type:

Object

Series of some types can be displayed with borders (bars, area, etc.). To set custom border settings for all such series at once, use the border object within the commonSeriesSettings configuration object.

If you have several series of one type, you can set border properties specific to this type using the corresponding object (area, line, or another) within the commonSeriesSettings configuration object. In addition, any non-specific series type property of the commonSeriesSettings.border object can be added to the series-type-specific border definition within the commonSeriesSettings.area/line/... | border configuration object. The values that are set within series-type-specific configuration objects override the corresponding common values.

In case you have to set an individual value for a common or series-type-specific border property, use the border object within the series object of the series array. The values that are set individually override corresponding common values.

color

Specifies a series color.

Type:

String

|

ChartsColor

| undefined
Default Value: undefined

Specified in the commonSeriesSettings object, this property colors all series in the chart. To color an individual series, specify this property in the series object within the series array.

This property supports the following colors:

You can also specify a custom pattern or gradient instead of a plain color. Follow the steps below:

  1. Call the registerPattern() or registerGradient() method to obtain a fill ID.

  2. Set the fillId field to the obtained ID in the color configuration object.

  3. Specify the base color for labels and connectors.

jQuery
index.js
$(function(){
    $("#polarChartContainer").dxPolarChart({
        // ...
        series: {
            // ...
            color: {
                base: "#000000",
                fillId: customPatternId
            }
        }
    });
});
Angular
app.component.html
app.component.ts
<dx-polar-chart ... >
    <dxi-series ...
        [color]="customPattern"
    >
    </dxi-series>
</dx-polar-chart>
// ...

export class AppComponent {
    // ...

    customPattern = {
        base: "#000000",
        fillId: this.customPatternId
    };
} 
Vue
App.vue (Options API)
App.vue (Composition API)
<template>
    <DxPolarChart ... >
        <DxSeries :color="customPattern" />
    </DxPolarChart>
</template>

<script>
import DxPolarChart, { DxSeries } from 'devextreme-vue/chart'; 
// ...

export default {
    components: {
        DxPolarChart,
        DxSeries
    },
    data() {
        return {
            // ...
            customPattern: {
                base: "#000000",
                fillId: this.customPatternId
            }
        }
    }
}
</script>
<template>
    <DxPolarChart ... >
        <DxSeries :color="customPattern" />
    </DxPolarChart>
</template>

<script setup>
import DxPolarChart, { DxSeries } from 'devextreme-vue/chart';  
// ...

const customPattern = {
    base: "#000000",
    fillId: customPatternId
};
</script>
React
App.js
import React from 'react';
import PolarChart, { Series } from 'devextreme-react/chart'; 

// ...
const customPattern = {
    base: "#000000",
    fillId: customPatternId
};

export default function App() { 
    return ( 
        <PolarChart ... >
            <Series color={customPattern} />
        </PolarChart>        
    ); 
} 

hoverMode

Specifies series elements to be highlighted when a user points to the series.

Type:

String

Default Value: 'onlyPoint'
Accepted Values: 'onlyPoint' | 'allSeriesPoints' | 'allArgumentPoints' | 'none'

When a user points to the series, it may react in one of the following ways depending on the value of the hoverMode property.

  • onlyPoint
    Only the series point that a user pauses on changes its style.
  • allSeriesPoints
    All points in the series change their style.
  • allArgumentPoints
    The series point that a user pauses on changes its style. Points with the same argument do it as well.
  • none
    The series does not react to pointing to it.
See Also

hoverStyle

An object defining configuration properties for a hovered series.

Type:

Object

To set a custom 'hover' style for all series at once, use the hoverStyle object within the commonSeriesSettings configuration object.

If you have several series of one type, you can set hover style properties to the values specific to this type using the corresponding object (area, line or another) within the commonSeriesSettings configuration object. The values that are set within series-type-specific configuration objects override the corresponding common values.

In case you have to set a hover style property for an individual series, use the hoverStyle object within the series object of the series array. The values that are set individually override corresponding common values.

ignoreEmptyPoints

Specifies whether the series should ignore null data points.

Type:

Boolean

Default Value: false

Data points that have the null value do not produce actual series points. Because of this, series may be drawn with unnecessary gaps where missing points should have been. To remove these gaps, set the ignoreEmptyPoints property to true.

label

An object defining the label configuration properties.

Type:

Object

Each series point can be accompanied by a text label that represents data related to the point. These are called series point labels. Use the label object's properties to set label properties for all chart series at once.

Specify the label object's properties within the commonSeriesSettings configuration object to set label properties for all chart series at once.

If you have several series of a single type, you can set label properties to the values specific to this series type using the corresponding object (area, line, etc.) within the commonSeriesSettings configuration object. The values that are set within series-type-specific configuration objects override the corresponding common values.

If you need to set a label property for an individual series, use the label object within the series object of the series array. The values that are set individually override the corresponding common values.

maxLabelCount

Specifies how many points are acceptable to be in a series to display all labels for these points. Otherwise, the labels will not be displayed.

Type:

Number

| undefined
Default Value: undefined

When there are several series in a chart and series with a large number of points, the point labels may overlap each other and make a chart difficult to read. In this instance, it is better to display the point labels depending on their quantity. To specify the maximum amount of the labels to be displayed, set the required number to the maxLabelCount field. If the number of the points on a series exceeded the number assigned to the maxLabelCount field, the point labels for this series will not be displayed.

minBarSize

Specifies the minimal length of a displayed bar in pixels.

Type:

Number

| undefined
Default Value: undefined

When you visualize data with small and large numbers using a bar-like series, the small numbers are represented by very small bars. It makes them difficult to click, select or hover over. In such a case, use the minBarSize property to set the minimal length of a displayed bar.

selectionMode

Specifies series elements to be highlighted when a user selects the series.

Type:

String

Default Value: 'onlyPoint'
Accepted Values: 'onlyPoint' | 'allSeriesPoints' | 'allArgumentPoints' | 'none'

When a user selects the series, it may react in one of the following ways depending on the value of the selectionMode property.

  • onlyPoint
    Only the selected series point changes its style.
  • allSeriesPoints
    All points in the selected series change their style.
  • allArgumentPoints
    The selected series point changes its style. Points with the same argument do it as well.
  • none
    The series does not react to selection.
See Also

selectionStyle

An object defining configuration properties for a selected series.

Type:

Object

The PolarChart UI component comes with API members that allow you to select a series in code. To set a custom 'selected' style for all series at once, use the selectionStyle object within the commonSeriesSettings configuration object.

If you have several series of one type, you can set selection style properties to the values specific to this type using the corresponding object (area, line or another) within the commonSeriesSettings configuration object. The values that are set within series-type-specific configuration objects override the corresponding common values.

In case you have to set a selection style property for an individual series, use the selectionStyle object within the series object of the series array. The values that are set individually override corresponding common values.

showInLegend

Specifies whether or not to show the series in the chart's legend.

Type:

Boolean

Default Value: true

tagField

Specifies the name of the data source field that provides data about a point.

Type:

String

Default Value: 'tag'
Cannot be used in themes.

When setting a common data source via the dataSource property, you can pass information about a point. For this purpose, add a separate field to the data source in addition to the argument and value fields. To set the specified data to the point instance, set the series' tagField property to the name of the field with the information. In this instance, when clicking a point in the chart, you can access the data associated with this point using the point's instance.

When defining series using the series configuration object, set the tagField property to the corresponding field from the data source for each series individually. If the field that supplies data about points is called similarly in several series, there is no need to set its name for each series individually. Instead, set it for the tagField property of the commonSeriesSettings configuration object.

You can also associate data with a series instance. To learn how to do this, refer to the description of the tag property of the series configuration object.

valueErrorBar

Configures error bars.

Type:

Object

Error bars are used on charts to indicate an error or an uncertainty in a reported measurement. They give a general idea of how precise a measurement is.

In PolarChart, an error bar is a vertical bar with two marks at its edges. An error bar accompanies a series point. Error bars can be generated either from concrete or calculated values. To generate one error bar, two values, high and low, are needed. If the data source of your chart provides concrete high and low values, assign the required data source fields to the highValueField and lowValueField properties.

Alternatively, you can calculate the high and low error bar values automatically. For this purpose, choose one of error bar types and specify the value to be used in calculation.

NOTE
Error bars are available for axes of a numeric type only.

valueField

Specifies the data source field that provides values for series points.

Type:

String

Default Value: 'val'
Cannot be used in themes.

When defining series using the series configuration object, set the valueField property for each series individually to the corresponding field from the data source. In case you use series templates, specify the valueField property of the commonSeriesSettings configuration object.

visible

Specifies the visibility of a series.

Type:

Boolean

Default Value: true

When this property is set to false for a series, the series appears invisible. If you require all the series to appear so, assign the same value to the visible property within the commonSeriesSettings configuration object.

In addition, you can show/hide series at runtime by using the show() or hide() method of a particular series respectively.

NOTE
When the series is invisible, the marker of its legend item is faded.