Skip to main content

BarSeriesView.BarDistance Property

Specifies the distance value (in pixels) between two bars of different series shown at the same argument point.

Namespace: DevExpress.WinUI.Charts

Assembly: DevExpress.WinUI.Charts.v23.2.dll

NuGet Package: DevExpress.WinUI

#Declaration

[DP(3, Handler = "InvalidateLayout")]
public int BarDistance { get; set; }

#Property Value

Type Description
Int32

An integer that is the distance between two neighboring bars, in pixels.

#Remarks

The following example sets the distance between bars to 10 pixels. Since series are generated based on the same template, the BarDistance value applies to all series:

Bar distance is labeled

<Charts:CartesianChart.SeriesItemTemplate>
    <DataTemplate>
        <Charts:Series DisplayName="{Binding Name}">
            <!--...-->
            <Charts:Series.View>
                <Charts:BarSeriesView BarDistance="10"/>
            </Charts:Series.View>
        </Charts:Series>
    </DataTemplate>
</Charts:CartesianChart.SeriesItemTemplate>
See Also