MindFusion WinForms Programmer's Guide
BarChart.TopLabelsFields Property
See Also
 





Gets or sets the database fields, which values are used as labels at the top of chart bars.

Namespace: MindFusion.Charting.WinForms
Assembly: MindFusion.Charting.WinForms

 Syntax

C#  Copy Code

public string TopLabelsFields { get; set; }

Visual Basic  Copy Code

Public Property TopLabelsFields As String

 Property Value

A string that specifies the name(s) of the database field(s).

 Remarks

The property enables you to bind the data used for drawing labels at the top of bars in bar charts to a database field. The data source object is specified with the DataSource property. If it is of type DataSet you can use the DataMember property to specify a given table as source for the chart data. In this case, the fields of the table appear as items in the drop down combo box in the TopLabelsFields property of the bar control. Use the comma as a separator in case you need to draw groups/clusters of bars and more than one database column should be selected.

The labels set with the TopLabelsFields are drawn only if the TopLabelType is set to LabelType.CustomText. You can specify a rotation angle, with which the labels are drawn with the TopLabelRotAngle property. Offset for the labels from the edge of the bar is set with TopLabelOffset.

The TopLabelsFields property, when populated with data, is the same as the TopLabels property.
Bars can also have inner labels. They are set with InnerLabelType and InnerLabels.

Default value for the TopLabelsFields property is an empty string ("").

 See Also

BarChart Members
BarChart Class
MindFusion.Charting.WinForms Namespace
Retrieving Chart Data from a Database