Επεξεργασία

Κοινή χρήση μέσω


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()

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

Properties

Alignment

Gets or sets the content alignment of an annotation.

AnchorAlignment

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

AnchorDataPoint

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

AnchorDataPointName

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

AnchorOffsetX

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

AnchorOffsetY

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

AnchorX

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

AnchorY

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

AnnotationGroup

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

AnnotationType

Gets or sets the type name of an annotation.

AxisX

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

AxisXName

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

AxisY

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

AxisYName

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

BackColor

Gets or sets the color of an annotation background.

BackGradientStyle

Gets or sets the gradient style of an annotation background.

BackHatchStyle

Gets or sets the hatching style of an annotation background.

BackSecondaryColor

Gets or sets the secondary color of an annotation background.

Bottom

Gets or sets the bottom boundary of an annotation position.

ClipToChartArea

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

Font

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

ForeColor

Gets or sets the text color of an annotation.

Height

Gets or sets the height of an annotation.

IsSelected

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

IsSizeAlwaysRelative

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

LineColor

Gets or sets the line color of an annotation.

LineDashStyle

Gets or sets the line style of an annotation.

LineWidth

Gets or sets the line width of an annotation.

MapAreaAttributes

Gets or sets the map area attributes of an annotation.

Name

Gets or sets the unique name of an annotation.

PostBackValue

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

Right

Gets or sets the right boundary position of an annotation.

ShadowColor

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

ShadowOffset

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

SmartLabelStyle

Gets or sets the smart label style of an annotation.

Tag

Gets or sets an object associated with this chart element.

(Inherited from ChartElement)
TextStyle

Gets or sets the text style of an annotation.

ToolTip

Gets or sets the tooltip text for an annotation.

Url

Gets or sets the URL of an annotation.

Visible

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

Width

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

X

Gets or sets the X coordinate of an annotation.

Y

Gets or sets the Y coordinate of the annotation.

YAxisName

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

Methods

BringToFront()

Brings an annotation to the front of all annotations.

Dispose()

Releases the resources used by the ChartElement.

(Inherited from ChartElement)
Dispose(Boolean)

Releases unmanaged resources and, optionally, managed resources.

Equals(Object)

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

(Inherited from ChartElement)
GetHashCode()

Returns a hash function for a particular type.

(Inherited from ChartElement)
GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
ResizeToContent()

Resizes an annotation according to its content size.

SendToBack()

Sends an annotation to the back of all the annotations.

SetAnchor(DataPoint, DataPoint)

Anchors an annotation to two data points.

SetAnchor(DataPoint)

Anchors an annotation to the specified data point.

ToString()

Returns a string that represents the current Object.

(Inherited from ChartElement)

Applies to