TdxChartXYSeriesCustomBarView.BarDistance Property
Specifies bar width as a percentage of an XY diagram width allocated to display an individual bar.
Declaration
property BarDistance: Integer read; write;
Property Value
Type | Description |
---|---|
Integer | The current distance (in pixels) between bars in a bar group at The property value can be 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.
Example: Distance between Bars in a Group
Value | Example[1] |
---|---|
1 (default) |
|
5 |
Example: The Minimum Distance Between Bars
Value | Example[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.
-
This example demonstrates different
BarDistance
property values on the same diagram with three Simple Bar series. The BarWidth property is set to60
. -
This example demonstrates different
BarDistance
property values on the same diagram with one Simple Bar series. The BarWidth property is set to100
.