Table of Contents

Class AnnotationBase

Namespace
LightningChartLib.WinForms.Charting.Annotations
Assembly
LightningChart.WinForms.Charting.NET4.dll

Annotations base class.

[TypeConverter(typeof(ExpandableObjectConverter))]
public abstract class AnnotationBase : DraggableObject, IChartNode, IDisposable, IHighlightingItem
Inheritance
AnnotationBase
Implements
Derived
Inherited Members

Constructors

AnnotationBase(ViewBase)

Constructor.

public AnnotationBase(ViewBase owner)

Parameters

owner ViewBase

Parent.

Properties

AllowAnchorAdjust

Allow anchor move by user. Anchor is centerpoint of rotation and start point of arrow.

public bool AllowAnchorAdjust { get; set; }

Property Value

bool

AllowResize

Allow resizing by user.

public bool AllowResize { get; set; }

Property Value

bool

AllowRotate

Allow rotation by user.

public bool AllowRotate { get; set; }

Property Value

bool

AllowTargetMove

Allow user to move target.

public bool AllowTargetMove { get; set; }

Property Value

bool

Anchor

Rotation uses this point as a center point. Tells where to place the anchored point within the control area. For X-dimension, value 0 represents left coordinate of the object and 1 right coordinate. For Y-dimension, value 0 represents top coordinate of the object and 1 bottom coordinate. To define anchor point outside the object area, define values outside range 0...1.

public PointDoubleXY Anchor { get; set; }

Property Value

PointDoubleXY

ArrowBeginWidthMultiplicator

A multiplicator for the arrow begin tip width

public float ArrowBeginWidthMultiplicator { get; set; }

Property Value

float

ArrowEndAspectRatio

Arrow end aspect ratio (width / height).

public double ArrowEndAspectRatio { get; set; }

Property Value

double

Remarks

Effective only if Style with arrow selected.

ArrowEndWidthMultiplicator

A multiplicator for the arrow end tip width

public float ArrowEndWidthMultiplicator { get; set; }

Property Value

float

ArrowLineStyle

Arrow line style.

public LineStyle ArrowLineStyle { get; set; }

Property Value

LineStyle

ArrowStyleBegin

Lead arrow style, in the beginning of line.

public ArrowStyle ArrowStyleBegin { get; set; }

Property Value

ArrowStyle

Remarks

Effective only if Style with arrow selected.

ArrowStyleEnd

Lead arrow style, in Target location.

public ArrowStyle ArrowStyleEnd { get; set; }

Property Value

ArrowStyle

Remarks

Effective only if Style with arrow selected.

AutoSizePadding

Padding between text and borders when automatic size is used.

public int AutoSizePadding { get; set; }

Property Value

int

BorderLineStyle

Border line style.

public LineStyle BorderLineStyle { get; set; }

Property Value

LineStyle

BorderVisible

Defines if border is visible.

public bool BorderVisible { get; set; }

Property Value

bool

CornerRoundRadius

Corner rounding radius, in pixels.

public int CornerRoundRadius { get; set; }

Property Value

int

Remarks

Effective only if rounded annotation style is selected.

Fill

Fill.

public Fill Fill { get; set; }

Property Value

Fill

LayerGrouping

Text is rendered on layers.

public bool LayerGrouping { get; set; }

Property Value

bool

LocationCoordinateSystem

Location coordinate system selection.

public CoordinateSystem LocationCoordinateSystem { get; set; }

Property Value

CoordinateSystem

LocationRelativeOffset

Location offset in pixels, relative to location.

public PointDoubleXY LocationRelativeOffset { get; set; }

Property Value

PointDoubleXY

Remarks

Effective only if LocationCoordinateSystem is 'RelativeCoordinatesToTarget'.

LocationScreenCoords

Location as screen coordinates in pixels.

public PointDoubleXY LocationScreenCoords { get; set; }

Property Value

PointDoubleXY

NibStyle

Nib style. Appearance of the mouse-interactive nibs.

public AnnotationNibStyle NibStyle { get; set; }

Property Value

AnnotationNibStyle

RotateAngle

Rotation angle, in degrees. The rotation is done around the element's center of rotation.

public double RotateAngle { get; set; }

Property Value

double

Selected

Defines if annotation is in 'Selected' state, allowing resizing, rotating and anchor adjustment.

public bool Selected { get; set; }

Property Value

bool

Shadow

Shadow beneath the object.

public Shadow Shadow { get; set; }

Property Value

Shadow

Size

Gets the size of annotation text bounding box

public SizeFloat Size { get; }

Property Value

SizeFloat

SizeScreenCoords

Size as screen coordinates.

public SizeDoubleXY SizeScreenCoords { get; set; }

Property Value

SizeDoubleXY

Remarks

Effective only if Sizing is 'ScreenCoordinates'.

Style

Style selects the main layout of annotation.

public AnnotationStyle Style { get; set; }

Property Value

AnnotationStyle

TargetCoordinateSystem

Target coordinate system selection.

public AnnotationTargetCoordinates TargetCoordinateSystem { get; set; }

Property Value

AnnotationTargetCoordinates

TargetScreenCoords

Target as screen coordinates. Target is the point that the arrow or call-out tip points to.

public PointDoubleXY TargetScreenCoords { get; set; }

Property Value

PointDoubleXY

Text

Annotation text.

public string Text { get; set; }

Property Value

string

TextStyle

Text style. Appearance of the text.

public AnnotationTextStyle TextStyle { get; set; }

Property Value

AnnotationTextStyle

Visible

Defines if annotation is visible.

public bool Visible { get; set; }

Property Value

bool

Methods

AdjustLocationAxisValueByUser(int)

Adjust location axis value when user interactive device moved.

protected virtual void AdjustLocationAxisValueByUser(int sweepPageIndex)

Parameters

sweepPageIndex int

sweep page index

ChangeOrder(OrderChangeAction)

Change object position in list of annotations.

public void ChangeOrder(OrderChangeAction action)

Parameters

action OrderChangeAction

Order change action.

DetectPositionOverSweepPageIndex(int)

Detect sweep page at position.

protected virtual int DetectPositionOverSweepPageIndex(int x)

Parameters

x int

x coordinate

Returns

int
returns M:LightningChartLib.WinForms.Charting.Annotations.AnnotationBase.DetectPositionOverSweepPageIndex(System.Int32)

Dispose(bool)

Clean up any resources being used.

protected override void Dispose(bool disposing)

Parameters

disposing bool

True if managed resources should be disposed, otherwise false.

HandleUserOverResizeNib()

Handle user over resize nib.

protected virtual void HandleUserOverResizeNib()

HandleUserOverTargetNib()

Handle user over target nib.

protected virtual void HandleUserOverTargetNib()

HandleWheelStateChanged(int, UserInteractiveDeviceEventType)

Wheel state changed.

protected virtual void HandleWheelStateChanged(int change, UserInteractiveDeviceEventType eventType)

Parameters

change int

wheel change value

eventType UserInteractiveDeviceEventType

event type

IsPositionOver(int, int, bool)

Is position over Annotation.

public override bool IsPositionOver(int x, int y, bool useDIP = false)

Parameters

x int

x-coordinate

y int

y-coordinate

useDIP bool

Use DIP instead of pixels as parameters

Returns

bool
returns M:LightningChartLib.WinForms.Charting.Annotations.AnnotationBase.IsPositionOver(System.Int32,System.Int32,System.Boolean)

MoveTargetLocationByUser(float, float, PointFloat)

Move target by user.

protected virtual void MoveTargetLocationByUser(float x, float y, PointFloat buttonDownFromTargetRenderCenter)

Parameters

x float

x coordinate

y float

y coordinate

buttonDownFromTargetRenderCenter PointFloat

render location on button down

MoveValueLocationByUser(float, float, PointFloat)

Move value location by user.

protected virtual void MoveValueLocationByUser(float x, float y, PointFloat pnRenderLocationCoordOnButtonDown)

Parameters

x float

x coordinate

y float

y coordinate

pnRenderLocationCoordOnButtonDown PointFloat

render location on button down

ResetWheelState()

Reset wheel value.

protected virtual void ResetWheelState()

SetProperCursor()

Set proper cursor. Default for dragging is hand and for resize SizeAll.

public override void SetProperCursor()

ToString()

Description of class.

public override string ToString()

Returns

string

Description.

Events

AnchorAdjustedByUser

Anchor has been adjusted by user.

public event AnnotationBase.AnchorAdjustedByUserEventHandler AnchorAdjustedByUser

Event Type

AnnotationBase.AnchorAdjustedByUserEventHandler

LocationRelativeOffsetChangedByUser

Location relative screen coordinate offset has been changed by user.

public event AnnotationBase.LocationRelativeOffsetChangedByUserEventHandler LocationRelativeOffsetChangedByUser

Event Type

AnnotationBase.LocationRelativeOffsetChangedByUserEventHandler

Remarks

Effective only if LocationCoordinateSystem is 'RelativeCoordinatesToTarget'.

LocationScreenCoordinatesChangedByUser

Location screen coordinates have been changed by user.

public event AnnotationBase.LocationScreenCoordinatesChangedByUserEventHandler LocationScreenCoordinatesChangedByUser

Event Type

AnnotationBase.LocationScreenCoordinatesChangedByUserEventHandler

Remarks

Effective only if LocationCoordinateSystem is 'ScreenCoordinates'.

RotatedByUser

Annotation has been rotated by user.

public event AnnotationBase.RotatedByUserEventHandler RotatedByUser

Event Type

AnnotationBase.RotatedByUserEventHandler