Annotation.Height Property

.NET Framework (current version)

The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

Gets or sets the height of an annotation.

Namespace:   System.Windows.Forms.DataVisualization.Charting
Assembly:  System.Windows.Forms.DataVisualization (in System.Windows.Forms.DataVisualization.dll)

public virtual double Height { get; set; }

Property Value

Type: System.Double

A double value that represents the height of an annotation.

The height of an annotation can be a negative value, in which case the annotation orientation is switched.

Annotation width can be in relative chart coordinates or in axes coordinates. Chart relative coordinates are used by default.

To use axes coordinates, anchor an annotation to a data point using the AnchorDataPoint property, or set the annotation axes using the AxisX or AxisY properties and set the IsSizeAlwaysRelative property to false.

Set the width to NaN to achieve automatic size calculation for annotations with text. The size will automatically be calculated based on the annotation text and font size.

.NET Framework
Available since 4.0
Return to top