Annotation Annotation Annotation Annotation Class

Definition

Defines properties and methods common to all annotations. This is an abstract class.

public ref class Annotation abstract : System::Web::UI::DataVisualization::Charting::ChartNamedElement, System::Web::UI::DataVisualization::Charting::IChartMapArea
public abstract class Annotation : System.Web.UI.DataVisualization.Charting.ChartNamedElement, System.Web.UI.DataVisualization.Charting.IChartMapArea
type Annotation = class
    inherit ChartNamedElement
    interface IChartMapArea
Public MustInherit Class Annotation
Inherits ChartNamedElement
Implements IChartMapArea
Inheritance
Derived
Implements

Remarks

Annotations are commonly used to comment or elaborate on chart elements such as data points. Annotations can also be used to draw custom shapes.

By default, annotations are positioned using relative coordinates, with (0,0) representing the top-left corner, and (100,100) representing the bottom-right corner of the chart image. It is also possible to switch from this relative coordinate system to a system that uses axis values. With an axis coordinate system, X and Y, which represent the position of the top-left corner of an annotation, are set using X axis and Y axis values, instead of values that range from 0-100.

There are two ways to use axis values when you specify the position and size of an annotation:

  • Set the AxisX, AxisY or both of these annotation properties to the AxisX and AxisY property values of a ChartArea object.

  • Use the AnchorDataPoint property to anchor the annotation to a data point. In this case, its positioning is automatically calculated.

All annotations are derived from the Annotation class, which can be used to set attributes common to all Annotation objects, such as color, position, anchoring and so forth.

Constructors

Annotation() Annotation() Annotation() Annotation()

Initializes a new instance of the Annotation class. This is the default constructor and should not be used.

Properties

Alignment Alignment Alignment Alignment

Gets or sets the content alignment of an annotation.

AnchorAlignment AnchorAlignment AnchorAlignment AnchorAlignment

Gets or sets the position alignment of an annotation to the anchor point.

AnchorDataPoint AnchorDataPoint AnchorDataPoint AnchorDataPoint

Gets or sets the data point to which an annotation is anchored.

AnchorDataPointName AnchorDataPointName AnchorDataPointName AnchorDataPointName

Gets or sets the name of a data point to which an annotation is anchored.

AnchorOffsetX AnchorOffsetX AnchorOffsetX AnchorOffsetX

Gets or sets the offset from the anchor point for the X position of an annotation.

AnchorOffsetY AnchorOffsetY AnchorOffsetY AnchorOffsetY

Gets or sets the offset from the anchor point for the Y position of an annotation.

AnchorX AnchorX AnchorX AnchorX

Gets or sets the X coordinate to which the annotation is anchored.

AnchorY AnchorY AnchorY AnchorY

Gets or sets the Y coordinate to which the annotation is anchored.

AnnotationGroup AnnotationGroup AnnotationGroup AnnotationGroup

Gets the group, if any, in which the annotation belongs to.

AnnotationType AnnotationType AnnotationType AnnotationType

Gets or sets the type name of an annotation.

AxisX AxisX AxisX AxisX

Gets or sets the X axis to which an annotation is attached.

AxisXName AxisXName AxisXName AxisXName

Gets or sets the name of the X axis which an annotation is attached to.

AxisY AxisY AxisY AxisY

Gets or sets the Y axis which an annotation is attached to.

AxisYName AxisYName AxisYName AxisYName

Gets or sets the name of the Y axis which an annotation is attached to.

BackColor BackColor BackColor BackColor

Gets or sets the color of an annotation background.

BackGradientStyle BackGradientStyle BackGradientStyle BackGradientStyle

Gets or sets the gradient style of an annotation background.

BackHatchStyle BackHatchStyle BackHatchStyle BackHatchStyle

Gets or sets the hatching style of an annotation background.

BackSecondaryColor BackSecondaryColor BackSecondaryColor BackSecondaryColor

Gets or sets the secondary color of an annotation background.

Bottom Bottom Bottom Bottom

Gets or sets the bottom boundary of an annotation position.

ClipToChartArea ClipToChartArea ClipToChartArea ClipToChartArea

Gets or sets the name of the chart area to which an annotation is clipped.

Font Font Font Font

Gets or sets the font to use for the text of an annotation.

ForeColor ForeColor ForeColor ForeColor

Gets or sets the text color of an annotation.

Height Height Height Height

Gets or sets the height of an annotation.

IsSelected IsSelected IsSelected IsSelected

Gets or sets a flag that determines if an annotation is selected.

IsSizeAlwaysRelative IsSizeAlwaysRelative IsSizeAlwaysRelative IsSizeAlwaysRelative

Gets or sets a flag that specifies whether the size of an annotation is always defined in relative chart coordinates.

LineColor LineColor LineColor LineColor

Gets or sets the line color of an annotation.

LineDashStyle LineDashStyle LineDashStyle LineDashStyle

Gets or sets the line style of an annotation.

LineWidth LineWidth LineWidth LineWidth

Gets or sets the line width of an annotation.

MapAreaAttributes MapAreaAttributes MapAreaAttributes MapAreaAttributes

Gets or sets the map area attributes of an annotation.

Name Name Name Name

Gets or sets the unique name of an annotation.

PostBackValue PostBackValue PostBackValue PostBackValue

Gets or sets the postback value which can be processed on the Click event.

Right Right Right Right

Gets or sets the right boundary position of an annotation.

ShadowColor ShadowColor ShadowColor ShadowColor

Gets or sets the color of an annotation's shadow.

ShadowOffset ShadowOffset ShadowOffset ShadowOffset

Gets or sets the size of an annotation's shadow.

SmartLabelStyle SmartLabelStyle SmartLabelStyle SmartLabelStyle

Gets or sets the smart label style of an annotation.

Tag Tag Tag Tag

Gets or sets an object associated with this chart element.

(Inherited from ChartElement)
TextStyle TextStyle TextStyle TextStyle

Gets or sets the text style of an annotation.

ToolTip ToolTip ToolTip ToolTip

Gets or sets the tooltip text for an annotation.

Url Url Url Url

Gets or sets the URL of an annotation.

Visible Visible Visible Visible

Gets or sets a flag that specifies whether an annotation is visible.

Width Width Width Width

Gets or sets the width, in pixels, of an annotation.

X X X X

Gets or sets the X coordinate of an annotation.

Y Y Y Y

Gets or sets the Y coordinate of the annotation.

YAxisName YAxisName YAxisName YAxisName

Gets or sets the name of the Y axis which an annotation is attached to.

Methods

BringToFront() BringToFront() BringToFront() BringToFront()

Brings an annotation to the front of all annotations.

Dispose() Dispose() Dispose() Dispose()

Releases the resources used by the ChartElement.

(Inherited from ChartElement)
Dispose(Boolean) Dispose(Boolean) Dispose(Boolean) Dispose(Boolean)

Releases unmanaged resources and, optionally, managed resources.

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

Determines whether the specified Object is equal to the current ChartElement.

(Inherited from ChartElement)
GetHashCode() GetHashCode() GetHashCode() GetHashCode()

Returns a hash function for a particular type.

(Inherited from ChartElement)
GetType() GetType() GetType() GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
ResizeToContent() ResizeToContent() ResizeToContent() ResizeToContent()

Resizes an annotation according to its content size.

SendToBack() SendToBack() SendToBack() SendToBack()

Sends an annotation to the back of all the annotations.

SetAnchor(DataPoint) SetAnchor(DataPoint) SetAnchor(DataPoint) SetAnchor(DataPoint)

Anchors an annotation to the specified data point.

SetAnchor(DataPoint, DataPoint) SetAnchor(DataPoint, DataPoint) SetAnchor(DataPoint, DataPoint) SetAnchor(DataPoint, DataPoint)

Anchors an annotation to two data points.

ToString() ToString() ToString() ToString()

Returns a string that represents the current Object.

(Inherited from ChartElement)

Applies to