Back to Devexpress

TdxChartXYSeriesCustomBarView.BarDistance Property

vcl-dxchartxyseriesbarview-dot-tdxchartxyseriescustombarview-de73e9fa.md

latest5.2 KB
Original Source

TdxChartXYSeriesCustomBarView.BarDistance Property

Specifies bar width as a percentage of an XY diagram width allocated to display an individual bar.

Declaration

delphi
property BarDistance: Integer read; write;

Property Value

TypeDescription
Integer

The current distance (in pixels) between bars in a bar group at 96 DPI.

The property value can be 1 or higher.

This property value also defines the minimum distance between bars when an XY diagram displays only one series with the active Simple Bar View.”

|

Remarks

Use the BarDistance property to change the minimum distance between bars when the Simple Bar View is active.

The current distance between bars is subtracted from the maximum diagram area width allocated to display an individual bar. If you resize the Chart control and change the full diagram width, bar widths change accordingly; the distance between bars in a group remains constant.

Distance between Bars and Multiple Series

To ensure visual consistency, only the View.BarDistance property of the first visible XY series with the active Simple Bar View affects all other visible XY series with the same active view. The View.BarDistance property values of subsequent visible Simple Bar series are ignored.

Property Value Examples

Distance between Bars in a Group

ValueExample[1]
1 ( default )
5

The Minimum Distance Between Bars

ValueExample[2]
1 ( default )
5

Property Setter Behavior

The BarDistance property setter changes the property value to 1 if you assign a value below 1 to the BarDistance property.

Property Value and Scaling

The BarDistance property specifies the base distance between bars in a group (in pixels) that corresponds to 96 DPI. The Chart control’s draw routines multiply the BarDistance property value by the current scale factor and round the result to the nearest integer to calculate the actual distance between bars on the target screen.

Default Value

The BarDistance property’s default value is DefaultBarDistance.

Limitations

The BarDistance property affects bars only in the series that use the Simple Bar View regardless of the number of visible series. This property has no effect on series that use Stacked Bar and Full-Stacked Views.

Footnotes

  1. This example demonstrates different BarDistance property values on the same diagram with three Simple Bar series. The BarWidth property is set to 60.

  2. This example demonstrates different BarDistance property values on the same diagram with one Simple Bar series. The BarWidth property is set to 100.

See Also

TdxChartXYSeriesCustomBarView.Appearance Property

TdxChartXYSeriesCustomBarView.BarWidth Property

TdxChartXYSeriesCustomBarView Class

TdxChartXYSeriesCustomBarView Members

dxChartXYSeriesBarView Unit