Skip to main content
All docs

HeatmapMatrixAdapter.XArguments Property

Gets or sets arguments for the heatmap x-axis.

Namespace: DevExpress.Xpf.Charts.Heatmap

Assembly: DevExpress.Xpf.Charts.v23.1.dll

NuGet Package: DevExpress.Wpf.Charts


public IEnumerable XArguments { get; set; }

Property Value

Type Description

A collection that stores x-arguments for a heatmap.


You can use objects of any type to populate the XArguments collection. The HeatmapControl converts the objects to string values.

To show arguments in reversed order, set the Reverse property of the x-axis to true.


This example shows how to use arrays of string and numeric values to create a heatmap.

A heatmap that uses a Matrix Adapter

Follow the steps below to create a heatmap:

  1. Add the HeatmapControl to the project.

  2. Create a HeatmapMatrixAdapter object and assign it to the HeatmapControl.DataAdapter property.

  3. Use the adapter’s XArguments and YArguments properties to populate the heatmap with x- and y-arguments that are displayed along x- and y-axes.

  4. Assign a two-dimensional array of double values to the adapter’s Values property.

  5. Create a HeatmapRangeColorProvider object and assign it to the HeatmapControl.ColorProvider property. The Range Color Provider paints cells based on a value range to which the cell value belongs.

  6. Set the HeatmapControl.Legend property to a HeatmapLegend object to display a legend.

    Specify the color provider’s HeatmapPaletteColorProvider.LegendItemPattern property to format legend items.

  7. Use the HeatmapControl.AxisX and HeatmapControl.AxisY properties to customize heatmap axes.

  8. To display cell labels, initialize the HeatmapControl.Label property with a HeatmapLabel object.

View Example

    Title="Heatmap" Height="500" Width="800">
                <dxh:HeatmapMatrixAdapter XArguments="{Binding XArguments}" 
                                          YArguments="{Binding YArguments}" 
                                          Values="{Binding Values}"/>
                <dxc:Title Content="Sales by Categories" HorizontalAlignment="Center"/>
                <dxh:HeatmapRangeColorProvider ApproximateColors="True" 
                        <dxh:HeatmapRangeStop Value="0" Type="Percentage"/>
                        <dxh:HeatmapRangeStop Value="200"/>
                        <dxh:HeatmapRangeStop Value="400"/>
                        <dxh:HeatmapRangeStop Value="600"/>
                        <dxh:HeatmapRangeStop Value="800"/>
                        <dxh:HeatmapRangeStop Value="1" Type="Percentage"/>
                <dxh:HeatmapLegend Margin="0, 0, 4, 10">
                        <dxc:LegendTitle Content="Revenue"/>
                        <dxc:AxisTitle Content="Region"/>
                <dxh:HeatmapAxis Reverse="True">
                        <dxc:AxisTitle Content="Category"/>
                <dxh:HeatmapLabel Foreground="Black" 
using DevExpress.Xpf.Core;

namespace HeatmapMatrixData {
    public partial class MainWindow : ThemedWindow {
        public MainWindow() {
    public class MatrixHeatmapViewModel {
        public string[] XArguments { get; set; }
        public string[] YArguments { get; set; }
        public double[,] Values { get; set; }
        public MatrixHeatmapViewModel() {
            XArguments = new string[] { "North", "South", "West", "East", "Central" };
            YArguments = new string[] { "Accessories", "Bikes", "Clothing", "Components" };
            Values = new double[,] {
               { 214.3, 530.1, 630.2, 854.4, 313.4 },
               { 321.3, 514.4, 281.3, 533.4, 541.9 },
               { 604.3, 429.1, 632.6, 438.4, 265.4 },
               { 485.3, 544.7, 740.3, 661.4, 516.6 }
See Also