vcl-dxchartxyseriesbarview-dot-tdxchartxyseriescustombarview-de73e9fa.md
Specifies bar width as a percentage of an XY diagram width allocated to display an individual bar.
property BarDistance: Integer read; write;
| Type | Description |
|---|---|
| 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.”
|
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.
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.
| Value | Example[1] |
|---|---|
1 ( default ) | |
5 |
| Value | Example[2] |
|---|---|
1 ( default ) | |
5 |
The BarDistance property setter changes the property value to 1 if you assign a value below 1 to the BarDistance property.
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.
The BarDistance property’s default value is DefaultBarDistance.
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
This example demonstrates different BarDistance property values on the same diagram with three Simple Bar series. The BarWidth property is set to 60.
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