Represents a smart labels strategy for a pie chart that places labels in two horizontal columns of the chart without them overlapping.
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.ChartView.dll
Syntax:
public class PieTwoLabelColumnsStrategy : SmartLabelsStrategyBase
Inheritance: objectSmartLabelsStrategyBasePieTwoLabelColumnsStrategy
Inherited Members
Constructors
public PieTwoLabelColumnsStrategy()
Properties
Gets or sets the distance between labels.
public int DistanceBetweenLabels { get; set; }
The distance between labels.
Methods
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:
Calculates the overlaps of labels.
protected virtual PieTwoLabelColumnsStrategy.ClusterizationInfo CalculateOverlaps(List<LabelElement> labels, Rectangle plotArea)
The labels.
plotAreaRectangleThe plot area.
Returns:PieTwoLabelColumnsStrategy.ClusterizationInfo
An object holding information on the labels collisions.
Gets the smart layout slot for a given label.
protected virtual Rectangle GetSmartLayoutSlot(PieSeries series, LabelElement label, double angle)
The series.
labelLabelElementThe label.
angledoubleThe angle.
Returns:Begind the optimization from the bottom and proceeds up.
protected virtual void OptimizeBottomUp(List<LabelElement> labels, Rectangle plotArea, bool isLeftColumn)
The labels.
plotAreaRectangleThe plot area.
isLeftColumnboolIndicates whether the left column is processed true or the right one false.
Begind the optimization from the center and proceeds up and down.
protected virtual void OptimizeCenterUpAndDown(List<LabelElement> labels, Rectangle plotArea, bool isLeftColumn)
The labels.
plotAreaRectangleThe plot area.
isLeftColumnboolIndicates whether the left column is processed true or the right one false.
Optimizes the labels positions in the two columns.
protected virtual void OptimizeColumnPositions(List<LabelElement> column, Rectangle plotArea, bool isLeftColumn)
The column.
plotAreaRectangleThe plot area.
isLeftColumnboolIndicates whether the left column is processed true or the right one false.
Begind the optimization from the top and proceeds down.
protected virtual void OptimizeTopDown(List<LabelElement> labels, Rectangle plotArea, bool isLeftColumn)
The labels.
plotAreaRectangleThe plot area.
isLeftColumnboolIndicates whether the left column is processed true or the right one false.