There is a property inside Teechart edit window named bar offset. Like the following picture. Inside .dfm file it's name is OffsetPercent.
Q: How to change it at runtime.
The OffsetPercent
property is published by the TCustomBarSeries
class, so you can typecast the series which is this series type descendant to access the property, e.g.:
TCustomBarSeries(Chart1.Series[0]).OffsetPercent := 65;
Or, if you know the exact series type, e.g. in your case the THorizBarSeries
:
THorizBarSeries(Chart1.Series[0]).OffsetPercent := 65;
I've intentionally missed a class type testing (with the is
operator) since it's not relevant for the answer, but you should use it in your real code if you weren't sure about the series class type you're accessing.