SideBySideRangeBarSeriesView.BarDistance Property

Gets or sets the variable distance value (as a fraction of axis units) between two bars of different series shown at the same argument point.

Namespace: DevExpress.XtraCharts

Assembly: DevExpress.XtraCharts.v20.1.dll


public double BarDistance { get; set; }
Public Property BarDistance As Double

Property Value

Type Description

A Double value that represents the distance between two neighboring bars as a fraction of axis units, where an axis unit is the distance between two major values on the axis.


The BarDistance property specifies the distance between two bars in a Side-by-Side Range Bar series. This property's value is given as a fraction of axis units (the distance between two major axis tickmarks). This means that the distance is being auto-adjusted when the chart is resized. For instance, if the BarDistance property is set to 0.5, the distance between the two bars will be always equal to half the range between the two major values on the axis.

To specify the distance between two bars in pixels, use the SideBySideRangeBarSeriesView.BarDistanceFixed property. If both the BarDistance and SideBySideRangeBarSeriesView.BarDistanceFixed properties are specified, their values are accumulated together as constant and variable distances.


The BarDistance property is synchronized in all Side-by-Side Range Bar series which are present in a ChartControl, and all of them always return the same value. So, changing the BarDistance property for any such series, affects the BarDistance property value in all other similar series.

For the same reason, when trying to set the BarDistance property before a Series is added to a chart's collection, an ArgumentException is thrown.


See Also