Populating With Data

This article demonstrates how the RadHeatmap control can be populated with data.

Categorical definition

<telerik:RadHeatMap ShowToolTips="True" Height="300"> 
        <telerik:CategoricalDefinition ItemsSource="{Binding}"  
                                    ValuePath="Temperature" /> 
The result is shown below:

Vertical definition

We'll set the months as HeaderPath of our HeatMap. Thus the months supplied by the Month property of our underlying source will be visualized as column headers. For each row we'll display the Temperature and Rain values of the corresponding month:

<telerik:RadHeatMap ShowToolTips="True" Height="300" CellBorderColor="DarkGray" CellBorderThickness="1">  
        <telerik:VerticalDefinition ItemsSource="{Binding}" HeaderPath="Month"> 
                <telerik:MemberMapping Header="Temperature in Celsius" ValuePath="Temperature"/> 
                <telerik:MemberMapping Header="Rain in Centimeters" ValuePath="Rain" 
                                        Colorizer="{StaticResource myColorizer}"/> 

You can use the same code to declare a HorizontalDefinition. The only difference will be the definition's type.

The result is shown below:

Rad Heat Map databinding 02

You can find a runnable solution demonstrating population with data in our SDK Examples repository located on GitHub, after navigating to HeatMap/PopulatingWithData

In this article
Not finding the help you need? Improve this article