New to Telerik UI for WinFormsStart a free 30-day trial

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:

C#
public class PieTwoLabelColumnsStrategy : SmartLabelsStrategyBase

Inheritance: objectSmartLabelsStrategyBasePieTwoLabelColumnsStrategy

Inherited Members SmartLabelsStrategyBase.DistanceToLabel

Constructors

C#
public PieTwoLabelColumnsStrategy()

Properties

Gets or sets the distance between labels.

C#
public int DistanceBetweenLabels { get; set; }
Property Value:

The distance between labels.

Methods

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

C#
public override void CalculateLocations(ChartSeriesCollection series, Rectangle plotArea)
Parameters:seriesChartSeriesCollection

All the series in the current chart view.

plotAreaRectangle

The plot area.

Overrides: SmartLabelsStrategyBase.CalculateLocations(ChartSeriesCollection, Rectangle)

Calculates the overlaps of labels.

C#
protected virtual PieTwoLabelColumnsStrategy.ClusterizationInfo CalculateOverlaps(List<LabelElement> labels, Rectangle plotArea)
Parameters:labelsList<LabelElement>

The labels.

plotAreaRectangle

The plot area.

Returns:

PieTwoLabelColumnsStrategy.ClusterizationInfo

An object holding information on the labels collisions.

Gets the smart layout slot for a given label.

C#
protected virtual Rectangle GetSmartLayoutSlot(PieSeries series, LabelElement label, double angle)
Parameters:seriesPieSeries

The series.

labelLabelElement

The label.

angledouble

The angle.

Returns:

Rectangle

Begind the optimization from the bottom and proceeds up.

C#
protected virtual void OptimizeBottomUp(List<LabelElement> labels, Rectangle plotArea, bool isLeftColumn)
Parameters:labelsList<LabelElement>

The labels.

plotAreaRectangle

The plot area.

isLeftColumnbool

Indicates whether the left column is processed true or the right one false.

Begind the optimization from the center and proceeds up and down.

C#
protected virtual void OptimizeCenterUpAndDown(List<LabelElement> labels, Rectangle plotArea, bool isLeftColumn)
Parameters:labelsList<LabelElement>

The labels.

plotAreaRectangle

The plot area.

isLeftColumnbool

Indicates whether the left column is processed true or the right one false.

Optimizes the labels positions in the two columns.

C#
protected virtual void OptimizeColumnPositions(List<LabelElement> column, Rectangle plotArea, bool isLeftColumn)
Parameters:columnList<LabelElement>

The column.

plotAreaRectangle

The plot area.

isLeftColumnbool

Indicates whether the left column is processed true or the right one false.

Begind the optimization from the top and proceeds down.

C#
protected virtual void OptimizeTopDown(List<LabelElement> labels, Rectangle plotArea, bool isLeftColumn)
Parameters:labelsList<LabelElement>

The labels.

plotAreaRectangle

The plot area.

isLeftColumnbool

Indicates whether the left column is processed true or the right one false.

Converts a RadRect to a RectangleF.

C#
public Rectangle ToRectangleF(RadRect rect)
Parameters:rectRadRect

The rect.

Returns:

Rectangle