Skip to main content
All docs
V24.1

HeatmapDiagram.GetBounds() Method

Returns information about the boundaries of heatmap cells.

Namespace: DevExpress.XtraCharts.Heatmap

Assembly: DevExpress.XtraCharts.v24.1.dll

NuGet Package: DevExpress.Charts

Declaration

public Rectangle GetBounds()

Returns

Type Description
Rectangle

A rectangle that defines the boundaries of the heatmap cells.

Remarks

The following example shows how to handle the HeatmapControl.CustomPaint event to draw a custom frame on a heatmap surface:

using DevExpress.Drawing;
using DevExpress.XtraCharts.Heatmap;
using System.Drawing;

namespace TestHeatmap {
    public partial class Form1 : Form {
        public Form1() {
            InitializeComponent();
            // ...
            heatmapControl1.CustomPaint += heatmapControl1_CustomPaint;
        }
        void heatmapControl1_CustomPaint(object sender, HeatmapCustomPaintEventArgs e) {
            using(DXPen pen = new DXPen(Color.Red, 2)) {
                e.DXGraphics.DrawRectangle(pen, this.heatmapControl1.Diagram.GetBounds());    
            }
        }
    }
}
See Also