ASP.NET MVC HeatMap Overview
The Telerik UI HeatMap HtmlHelper for ASP.NET MVC is a server-side wrapper for the Kendo UI HeatMap widget.
The HeatMap uses colors to indicate the relative value of data points in two dimensions. HeatMap charts are suitable for visualizing the magnitude of a value over two dimensions.
Telerik UI for ASP.NET MVC is a
professional grade UI library with 110+ components for building modern and feature-rich applications. To try it out sign up for a free 30-day trial.
New to Telerik UI for ASP.NET MVC?
To see the component in action, check the examples:
Basic configuration
The following example demonstrates how to define a HeatMap.
@(Html.Kendo().Chart()
.Name("heatmap")
.Title("Source control contributions for the last 12 weeks")
.Series(series =>
{
series.HeatMap(new object[] {
new {Week = 1, Day = "Mon", Value = 8}, new {Week = 1, Day = "Tue", Value = 4}, new {Week = 1, Day = "Wed", Value = 7}, new {Week = 1, Day = "Thu", Value = 14}, new {Week = 1, Day = "Fri", Value = 10}, new {Week = 1, Day = "Sat", Value = 0}, new {Week = 1, Day = "Sun", Value = 0},
new {Week = 2, Day = "Mon", Value = 6}, new {Week = 2, Day = "Tue", Value = 6}, new {Week = 2, Day = "Wed", Value = 9}, new {Week = 2, Day = "Thu", Value = 12}, new {Week = 2, Day = "Fri", Value = 12}, new {Week = 2, Day = "Sat", Value = 3}, new {Week = 2, Day = "Sun", Value = 0},
new {Week = 3, Day = "Mon", Value = 5}, new {Week = 3, Day = "Tue", Value = 5}, new {Week = 3, Day = "Wed", Value = 8}, new {Week = 3, Day = "Thu", Value = 11}, new {Week = 3, Day = "Fri", Value = 0}, new {Week = 3, Day = "Sat", Value = 1}, new {Week = 3, Day = "Sun", Value = 0},
new {Week = 4, Day = "Mon", Value = 0}, new {Week = 4, Day = "Tue", Value = 0}, new {Week = 4, Day = "Wed", Value = 0}, new {Week = 4, Day = "Thu", Value = 0}, new {Week = 4, Day = "Fri", Value = 0}, new {Week = 4, Day = "Sat", Value = 0}, new {Week = 4, Day = "Sun", Value = 0},
new {Week = 5, Day = "Mon", Value = 9}, new {Week = 5, Day = "Tue", Value = 0}, new {Week = 5, Day = "Wed", Value = 0}, new {Week = 5, Day = "Thu", Value = 0}, new {Week = 5, Day = "Fri", Value = 0}, new {Week = 5, Day = "Sat", Value = 0}, new {Week = 5, Day = "Sun", Value = 0},
new {Week = 6, Day = "Mon", Value = 6}, new {Week = 6, Day = "Tue", Value = 4}, new {Week = 6, Day = "Wed", Value = 7}, new {Week = 6, Day = "Thu", Value = 14}, new {Week = 6, Day = "Fri", Value = 10}, new {Week = 6, Day = "Sat", Value = 2}, new {Week = 6, Day = "Sun", Value = 0},
new {Week = 7, Day = "Mon", Value = 4}, new {Week = 7, Day = "Tue", Value = 6}, new {Week = 7, Day = "Wed", Value = 9}, new {Week = 7, Day = "Thu", Value = 2}, new {Week = 7, Day = "Fri", Value = 4}, new {Week = 7, Day = "Sat", Value = 0}, new {Week = 7, Day = "Sun", Value = 0},
new {Week = 8, Day = "Mon", Value = 11}, new {Week = 8, Day = "Tue", Value = 4}, new {Week = 8, Day = "Wed", Value = 7}, new {Week = 8, Day = "Thu", Value = 14}, new {Week = 8, Day = "Fri", Value = 10}, new {Week = 8, Day = "Sat", Value = 0}, new {Week = 8, Day = "Sun", Value = 0},
new {Week = 9, Day = "Mon", Value = 5}, new {Week = 9, Day = "Tue", Value = 4}, new {Week = 9, Day = "Wed", Value = 7}, new {Week = 9, Day = "Thu", Value = 4}, new {Week = 9, Day = "Fri", Value = 1}, new {Week = 9, Day = "Sat", Value = 0}, new {Week = 9, Day = "Sun", Value = 0},
new {Week = 10, Day = "Mon", Value = 3}, new {Week = 10, Day = "Tue", Value = 6}, new {Week = 10, Day = "Wed", Value = 9}, new {Week = 10, Day = "Thu", Value = 12}, new {Week = 10, Day = "Fri", Value = 12}, new {Week = 10, Day = "Sat", Value = 4}, new {Week = 10, Day = "Sun", Value = 0},
new {Week = 11, Day = "Mon", Value = 1}, new {Week = 11, Day = "Tue", Value = 4}, new {Week = 11, Day = "Wed", Value = 7}, new {Week = 11, Day = "Thu", Value = 10}, new {Week = 11, Day = "Fri", Value = 10}, new {Week = 11, Day = "Sat", Value = 0}, new {Week = 11, Day = "Sun", Value = 0},
new {Week = 12, Day = "Mon", Value = 0}, new {Week = 12, Day = "Tue", Value = 4}, new {Week = 12, Day = "Wed", Value = 7}, new {Week = 12, Day = "Thu", Value = 8}, new {Week = 12, Day = "Fri", Value = 10}, new {Week = 12, Day = "Sat", Value = 0}, new {Week = 12, Day = "Sun", Value = 0}
}).xField("Week").yField("Day").Field("Value");
})
.Tooltip(t => t.Visible(true).Template("#:value.value# contributions on #:value.y#, week #:value.x#"))
.XAxis(x=>x
.Numeric()
.Labels(l=>l.Template("Week #:value#").Rotation(45))
)
.YAxis(y=>y
.Categories(new[] { "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"})
)
)
Functionality and Features
- Data Binding—The HeatMap supports remote server data binding.
- Color Scheme—You can use the built-in color scale to control the lightness of the series depending on the point value.
- Pan and Zoom—Enable the panning and zooming to allow users to observe the visualized data in different segments.
- Crosshairs—The HeatMap enables you to configure the axes crosshairs.
- Markers—You can configure the markers of the HeatMap to display different shapes.