Class VerticalAdjusmentLabelsStrategy
A SmartLabelsStrategyBase that adjusts the labels vertically.
Inherited Members
Namespace: Telerik.WinControls.UI
Assembly: Telerik.WinControls.ChartView.dll
Syntax
public class VerticalAdjusmentLabelsStrategy : SmartLabelsStrategyBase
Constructors
VerticalAdjusmentLabelsStrategy()
Declaration
public VerticalAdjusmentLabelsStrategy()
Properties
DistanceBetweenLabels
Gets or sets the distance between labels.
Declaration
public int DistanceBetweenLabels { get; set; }
Property Value
System. 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
public override void CalculateLocations(ChartSeriesCollection series, Rectangle plotArea)
Parameters
Chart All the series in the current chart view. |
System. The plot area. |
Overrides
FinalPositionsOptimization(List<LabelElement>)
Optimizes label positions after all labels have been processed.
Declaration
protected virtual void FinalPositionsOptimization(List<LabelElement> labels)
Parameters
System. The labels. |
GetBestPositionInDownwardDirection(List<LabelElement>, LabelElement, CartesianSeries)
Gets the best position in downward direction.
Declaration
protected virtual Rectangle GetBestPositionInDownwardDirection(List<LabelElement> labels, LabelElement labelToMove, CartesianSeries series)
Parameters
System. The labels. |
Label The label to move. |
Cartesian The series. |
Returns
System.
|
GetBestPositionInLeftDirection(List<LabelElement>, LabelElement, CartesianSeries)
Gets the best position in left direction.
Declaration
protected virtual Rectangle GetBestPositionInLeftDirection(List<LabelElement> labels, LabelElement labelToMove, CartesianSeries series)
Parameters
System. The labels. |
Label The label to move. |
Cartesian The series. |
Returns
System.
|
GetBestPositionInRightDirection(List<LabelElement>, LabelElement, CartesianSeries)
Gets the best position in right direction.
Declaration
protected virtual Rectangle GetBestPositionInRightDirection(List<LabelElement> labels, LabelElement labelToMove, CartesianSeries series)
Parameters
System. The labels. |
Label The label to move. |
Cartesian The series. |
Returns
System.
|
GetBestPositionInUpwardDirection(List<LabelElement>, LabelElement, CartesianSeries)
Gets the best position in upward direction.
Declaration
protected virtual Rectangle GetBestPositionInUpwardDirection(List<LabelElement> labels, LabelElement labelToMove, CartesianSeries series)
Parameters
System. The labels. |
Label The label to move. |
Cartesian The series. |
Returns
System.
|
GetElementWithMostOverlaps(List<LabelElement>, ChartSeriesCollection)
Gets the element with most overlaps.
Declaration
protected virtual LabelElement GetElementWithMostOverlaps(List<LabelElement> labels, ChartSeriesCollection series)
Parameters
System. The labels. |
Chart The series. |
Returns
HasCollisions(List<LabelElement>, LabelElement, Rectangle)
Determines whether the specified label rectangle has collisions with the rest of the labels.
Declaration
protected virtual bool HasCollisions(List<LabelElement> labels, LabelElement labelToMove, Rectangle currentRect)
Parameters
System. The labels. |
Label The label to move. |
System. The current rect for the label being moved. |
Returns
System.
|
LineIntersectsLine(Point, Point, Point, Point)
Returns a value indicating whether two lines intersect.
Declaration
protected virtual bool LineIntersectsLine(Point l1p1, Point l1p2, Point l2p1, Point l2p2)
Parameters
System. The begin point of the first line. |
System. The end point of the first line |
System. The begin point of the second line. |
System. The end point of the second line. |
Returns
System.
|
LineIntersectsRect(Point, Point, Rectangle)
Returns a value indicating whether a line represented with two points intersects the given rectangle.
Declaration
protected virtual bool LineIntersectsRect(Point p1, Point p2, Rectangle r)
Parameters
System. The begin point of the line. |
System. The end point of the line. |
System. The rectangle. |
Returns
System.
|
RestrictWithinAxes(List<LabelElement>, CartesianSeries)
Restricts rectangles within the chart axes.
Declaration
protected virtual void RestrictWithinAxes(List<LabelElement> labels, CartesianSeries series)
Parameters
System. The labels. |
Cartesian The series. |
SeriesLineIntersectsLine(ChartSeries, Point, Point)
Returns a value indicating whether the series line intersects with the given line.
Declaration
protected virtual bool SeriesLineIntersectsLine(ChartSeries chartSeries, Point p1, Point p2)
Parameters
Chart The chart series. |
System. The begin point of the line. |
System. The end point of the line. |
Returns
System.
|
SeriesLineIntersectsRect(ChartSeries, Rectangle)
Returns a value indicating whether the series line intersects with the rectangle.
Declaration
protected virtual bool SeriesLineIntersectsRect(ChartSeries chartSeries, Rectangle rect)
Parameters
Chart The chart series. |
System. The rect. |
Returns
System.
|