Class
VerticalAdjusmentLabelsStrategy

A SmartLabelsStrategyBase that adjusts the labels vertically.

Definition

Namespace:Telerik.WinControls.UI

Assembly:Telerik.WinControls.ChartView.dll

Syntax:

cs-api-definition
public class VerticalAdjusmentLabelsStrategy : SmartLabelsStrategyBase

Inheritance: objectSmartLabelsStrategyBaseVerticalAdjusmentLabelsStrategy

Inherited Members SmartLabelsStrategyBase.DistanceToLabel

Constructors

VerticalAdjusmentLabelsStrategy()

Declaration

cs-api-definition
public VerticalAdjusmentLabelsStrategy()

Properties

DistanceBetweenLabels

Gets or sets the distance between labels.

Declaration

cs-api-definition
public int DistanceBetweenLabels { get; set; }

Property Value

int

The distance between labels.

Methods

CalculateLocations(ChartSeriesCollection, Rectangle)

Within this method labels' positions are calculated and are set to the SmartLocation property of each label.

Declaration

cs-api-definition
public override void CalculateLocations(ChartSeriesCollection series, Rectangle plotArea)

Parameters

series

ChartSeriesCollection

All the series in the current chart view.

plotArea

Rectangle

The plot area.

Overrides SmartLabelsStrategyBase.CalculateLocations(ChartSeriesCollection, Rectangle)

FinalPositionsOptimization(List<LabelElement>)

Optimizes label positions after all labels have been processed.

Declaration

cs-api-definition
protected virtual void FinalPositionsOptimization(List<LabelElement> labels)

Parameters

labels

List<LabelElement>

The labels.

GetBestPositionInDownwardDirection(List<LabelElement>, LabelElement, CartesianSeries)

Gets the best position in downward direction.

Declaration

cs-api-definition
protected virtual Rectangle GetBestPositionInDownwardDirection(List<LabelElement> labels, LabelElement labelToMove, CartesianSeries series)

Parameters

labels

List<LabelElement>

The labels.

labelToMove

LabelElement

The label to move.

series

CartesianSeries

The series.

Returns

Rectangle

GetBestPositionInLeftDirection(List<LabelElement>, LabelElement, CartesianSeries)

Gets the best position in left direction.

Declaration

cs-api-definition
protected virtual Rectangle GetBestPositionInLeftDirection(List<LabelElement> labels, LabelElement labelToMove, CartesianSeries series)

Parameters

labels

List<LabelElement>

The labels.

labelToMove

LabelElement

The label to move.

series

CartesianSeries

The series.

Returns

Rectangle

GetBestPositionInRightDirection(List<LabelElement>, LabelElement, CartesianSeries)

Gets the best position in right direction.

Declaration

cs-api-definition
protected virtual Rectangle GetBestPositionInRightDirection(List<LabelElement> labels, LabelElement labelToMove, CartesianSeries series)

Parameters

labels

List<LabelElement>

The labels.

labelToMove

LabelElement

The label to move.

series

CartesianSeries

The series.

Returns

Rectangle

GetBestPositionInUpwardDirection(List<LabelElement>, LabelElement, CartesianSeries)

Gets the best position in upward direction.

Declaration

cs-api-definition
protected virtual Rectangle GetBestPositionInUpwardDirection(List<LabelElement> labels, LabelElement labelToMove, CartesianSeries series)

Parameters

labels

List<LabelElement>

The labels.

labelToMove

LabelElement

The label to move.

series

CartesianSeries

The series.

Returns

Rectangle

GetElementWithMostOverlaps(List<LabelElement>, ChartSeriesCollection)

Gets the element with most overlaps.

Declaration

cs-api-definition
protected virtual LabelElement GetElementWithMostOverlaps(List<LabelElement> labels, ChartSeriesCollection series)

Parameters

labels

List<LabelElement>

The labels.

series

ChartSeriesCollection

The series.

Returns

LabelElement

HasCollisions(List<LabelElement>, LabelElement, Rectangle)

Determines whether the specified label rectangle has collisions with the rest of the labels.

Declaration

cs-api-definition
protected virtual bool HasCollisions(List<LabelElement> labels, LabelElement labelToMove, Rectangle currentRect)

Parameters

labels

List<LabelElement>

The labels.

labelToMove

LabelElement

The label to move.

currentRect

Rectangle

The current rect for the label being moved.

Returns

bool

true if the specified rect has collisions; otherwise, false.

LineIntersectsLine(Point, Point, Point, Point)

Returns a value indicating whether two lines intersect.

Declaration

cs-api-definition
protected virtual bool LineIntersectsLine(Point l1p1, Point l1p2, Point l2p1, Point l2p2)

Parameters

l1p1

Point

The begin point of the first line.

l1p2

Point

The end point of the first line

l2p1

Point

The begin point of the second line.

l2p2

Point

The end point of the second line.

Returns

bool

LineIntersectsRect(Point, Point, Rectangle)

Returns a value indicating whether a line represented with two points intersects the given rectangle.

Declaration

cs-api-definition
protected virtual bool LineIntersectsRect(Point p1, Point p2, Rectangle r)

Parameters

p1

Point

The begin point of the line.

p2

Point

The end point of the line.

r

Rectangle

The rectangle.

Returns

bool

RestrictWithinAxes(List<LabelElement>, CartesianSeries)

Restricts rectangles within the chart axes.

Declaration

cs-api-definition
protected virtual void RestrictWithinAxes(List<LabelElement> labels, CartesianSeries series)

Parameters

labels

List<LabelElement>

The labels.

series

CartesianSeries

The series.

SeriesLineIntersectsLine(ChartSeries, Point, Point)

Returns a value indicating whether the series line intersects with the given line.

Declaration

cs-api-definition
protected virtual bool SeriesLineIntersectsLine(ChartSeries chartSeries, Point p1, Point p2)

Parameters

chartSeries

ChartSeries

The chart series.

p1

Point

The begin point of the line.

p2

Point

The end point of the line.

Returns

bool

SeriesLineIntersectsRect(ChartSeries, Rectangle)

Returns a value indicating whether the series line intersects with the rectangle.

Declaration

cs-api-definition
protected virtual bool SeriesLineIntersectsRect(ChartSeries chartSeries, Rectangle rect)

Parameters

chartSeries

ChartSeries

The chart series.

rect

Rectangle

The rect.

Returns

bool