MindFusion.Charting Programmer's Guide

BarChart.Data Property

See Also
 





Gets or sets the numerical data used for calculating the height of chart bars. 

Namespace: MindFusion.Charting.WebForms
Assembly: MindFusion.Charting.WebForms

 Syntax

C#  Copy Code

public IList Data { get; }

Visual Basic  Copy Code

Public ReadOnly Property Data As IList

 Property Value

An object of type .NET IList that holds other lists with data for the chart.

 Remarks

Add lists with data to the property or assign to it a list that holds the data lists. The data can be numbers, or in any other format that can be parsed to numbers.

Each bar cluster is formed from data at the same position in the Data series. This means that the data for the first cluster will be taken from the elements at first position in the Data lists; the data for the second cluster - from the elements at second position in the Data lists and so on. The count of bars in the cluster is determined by the count of lists in the Data property. The count of the clusters is determined by the count of numbers in the longest list in Data.

Groups2D and Groups3D bar charts represent bars in a group. The data for each group is taken from the respective Data list. Thus, data for the first group is taken from all the numbers in the first list in the Data property. The count of values in the list determines the count of bars in the group. The count of lists in the Data property determines the count of the groups.

If the chart has summaries, the values are added as bars to each bar group. Summaries are added to the SummaryValues property.

Default value for the Data property is an empty list.

 See Also