[]
Represents heatmap series that displays 2D data array using color variations.
public class Heatmap : Series, IComponent, IHandleEvent, IHandleAfterRender, IDisposable
The following code creates heatmap series and add it to the chart.
var hmap = new Heatmap();
hmap.ItemsSource = new double [,] { { 0, 0.5 }, {0.5, 1 }, { 1, 0.4 }, { 0.5, 1 } };
hmap.ColorScale = new GradientColorScale() { Min = 0, Max = 1, Colors = new List<Color> { Color.White, Color.Red } };
chart.Series.Add(hmap);
chart.AxisX.ItemsSource = new string[] {"Q1", "Q2", "Q3", "Q4" };
chart.AxisY.ItemsSource = new string[] { "Region 1", "Region 2" };
Name | Description |
---|---|
Heatmap() | Creates an instance of Heatmap class. |
Name | Description |
---|---|
ColorScale | Gets or sets the color scale for the heatmap. The color scale defines trasformation from data value to color. |
StartX | Gets or sets the starting data x-value. The default value is -0.5. |
StartY | Gets or sets the starting data y-value. The default value is -0.5. |
StepX | Gets or sets the data step by x-coordinate. The default value is 1. |
StepY | Gets or sets the data step by y-coordinate. The default value is 1. |
Name | Description |
---|---|
GetChartType() | Gets the series chart type. |
GetItem(int) | Gets the series data item by index. |
GetValues(int) | Gets the series data values. |
OnRendering(IRenderEngine) | Called before series is rendered. |