Represents a Fast Algorithm for Label Placement implementation for the RadChartView labels.
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.ChartView.dll
Syntax:
public class FourPositionsLabelsStrategy : SmartLabelsStrategyBase
Inheritance: objectSmartLabelsStrategyBaseFourPositionsLabelsStrategy
Derived Classes:
Inherited Members
Constructors
public FourPositionsLabelsStrategy()
Properties
Gets or sets the number of label positions the strategy will serach in.
protected virtual int PositionsPerLabel { get; }
Methods
Adds any labels that do not have a position set to the position with the least collisions.
protected virtual void AssignMinimumOverlapLabels()
Assigns the smart rectangles of labels.
protected virtual void AssignSmartRectangles(ChartSeriesCollection series)
The series.
Builds the adjacency matrix. A matrix that represents the collision graph of all labels.
protected virtual void BuildAdjacencyMatrix(ChartSeriesCollection series)
The series.
Within this method labels' positions are calculated and are set to the SmartLocation property of each label.
public override void CalculateLocations(ChartSeriesCollection series, Rectangle plotArea)
All the series in the current chart view.
plotAreaRectangleThe plot area.
Overrides:
Gets all the possible label positions.
protected virtual IEnumerable<Rectangle> GetAllLabelPositions(LabelElement label)
The label.
Returns:IEnumerable<Rectangle>
Gets the label rectangle from its position.
protected virtual Rectangle GetLabelRectangle(LabelElement label, int labelPosition)
The label.
labelPositionintThe label position.
Returns:Determines whether the are labels with unassigned label position.
protected virtual bool HasUnassignedLabels()
true if [has unassigned labels]; otherwise, false.
Determines whether the current state of the adjacency matrix is a final solution.
protected virtual bool IsFinalSolution()
true if it is final solution; otherwise, false.
Determines whether there are uncheck label positions in the adjacency matrix.
protected virtual bool IsMatrixEmpty()
true if [is matrix empty]; otherwise, false.
Peforms local optiomizations to labels that improve the global solution.
protected virtual void LocalOptimization()
Places as much as possible labels into positions without overlaps.
protected virtual void MaximumNonconflict()