Row/Column Headers
The Row/Column headers of the RadHeatMap can be further customized through the RowHeaderSettings and ColumnHeaderSettings properties.
Row Headers
The customization of the row headers is possible through the RowHeaderSettings property of the RadHeatMap. This property is of type HeatMapRowHeaderSettings object. Except for exposing the common properties for styling the labels, the HeatMapRowHeaderSettings expose an additional one to change the position of the label to the right side of the RadHeatMap.
-
LabelsPanelPosition: A property of type HeatMapRowLabelsPanelPosition that gets or sets the row headers position. This is an enumeration and it allows the following values:
- Left: The row labels will be position on the left side of the RadHeatMap. (Default value)
- Right: The row labels will be position on the right side of the RadHeatMap.
Example 1: Modifying row headers
Column Headers
The customization of the column headers is possible through the ColumnHeaderSettings property of the RadHeatMap. This property is of type HeatMapColumnHeaderSettings object. Except exposing the common properties (LabelStyle, HoveredLabelStyle, LabelFormat, etc.) for styling the labels, the HeatMapColumnHeaderSettings provide two additional properties to change the position of the column headers and to rotate the labels.
-
LabelsPanelPosition: A property of type HeatMapColumnLabelsPanelPosition that gets or sets the column headers position. This is an enumeration and it allows the following values:
- Top: The column headers will be position at the top of the RadHeatMap. (Default value)
- Bottom: The column headers will be position at the bottom of the RadHeatMap.
LabelRotationAngle: A property of type double that gets or sets the rotation angle applied to the label.
Example 2: Modifying column headers
Example
For demonstration purposes, we will use a simple class that will represent one cell of the RadHeatMap control. This class will expose three properties:
- Row: А string property which gets or sets the row name of the corresponding cell.
- Column: А string property which gets or sets the column name of the corresponding cell.
- Value: Аn integer property which gets or sets the value of the corresponding cell.
Example 3: Creating the model
To fill the RadHeatMap with sample data we can create a list of TempInfo objects and set it as DataContext of the control.
Example 4: Populating the RadHeatMap control
After having the sample data ready, we can go in the XAML code and modify row/column headers.