THorizBarSeries

THorizBarSeries
Hierarchy     Properties     Methods     Events     

Horizontal Bar series.




Unit
Series

Description
The THorizBarSeries component outputs all points as horizontal bars. To see a visual representation of this Series type, go to the TeeChart User Guide.

Several THorizBarSeries can be displayed side-to-side, one behind the other, stacked or stacked 100% by using the MultiBar property.

Set the ParentChart property to the desired Chart component. Use the Add or AddXY methods to manually fill area points.

Warning:

The most important concept in THorizBarSeries is that point values are INVERTED.
That means Y values are the bar order position while X values are the bars values.

The
Add method does the conversion automatically and is the recommended method to add points.
When using the AddXY method you should calculate the correct Y position.

Example:

// This code adds 10 horizontal bars.
// The loop counter is used as the Y bar value (the bar order)
for t:= 1 to 10 do
Series1.AddXY( MyValues[t], t, MyLabels[t], MyColor[t] );


The BarBrush property determines the pattern used to fill bars, while the BarPen property is used to draw the bar edges.

Set the desired bar style ( cilynder, pyramid, etc ) by changing the BarStyle property.

Use the BarWidthPercent property to control the relative distance between bars. You can specify an exact bar height by using the CustomBarHeight property.

The Dark3D property controls if bar sides are filled with a darker color than front bar faces.

The OffsetPercent property determines the bars vertical displacement. This can be used to create overlayed bars with several bar series components.

Bar series leave margins both at top and bottom Chart sides. You can turn off this default behaviour setting the SideMargins property to False.

By default, bar left positions start at zero horizontal coordinate. Set the YOrigin property to the desired starting left value or set the UseYOrigin to False to make bar left sides start at minimum bars value.

The OnGetBarStyle event can be used to supply a different bar style for each Series point.

Please refer to
TCustomBarSeries ancestor class description for all common Series properties like Marks, Axis dependence, methods and events.