Class
PieTwoLabelColumnsStrategy

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:

cs-api-definition
public class PieTwoLabelColumnsStrategy : SmartLabelsStrategyBase

Inheritance: objectSmartLabelsStrategyBasePieTwoLabelColumnsStrategy

Inherited Members SmartLabelsStrategyBase.DistanceToLabel

Constructors

PieTwoLabelColumnsStrategy()

Declaration

cs-api-definition
public PieTwoLabelColumnsStrategy()

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)

CalculateOverlaps(List<LabelElement>, Rectangle)

Calculates the overlaps of labels.

Declaration

cs-api-definition
protected virtual PieTwoLabelColumnsStrategy.ClusterizationInfo CalculateOverlaps(List<LabelElement> labels, Rectangle plotArea)

Parameters

labels

List<LabelElement>

The labels.

plotArea

Rectangle

The plot area.

Returns

PieTwoLabelColumnsStrategy.ClusterizationInfo

An object holding information on the labels collisions.

GetSmartLayoutSlot(PieSeries, LabelElement, double)

Gets the smart layout slot for a given label.

Declaration

cs-api-definition
protected virtual Rectangle GetSmartLayoutSlot(PieSeries series, LabelElement label, double angle)

Parameters

series

PieSeries

The series.

label

LabelElement

The label.

angle

double

The angle.

Returns

Rectangle

OptimizeBottomUp(List<LabelElement>, Rectangle, bool)

Begind the optimization from the bottom and proceeds up.

Declaration

cs-api-definition
protected virtual void OptimizeBottomUp(List<LabelElement> labels, Rectangle plotArea, bool isLeftColumn)

Parameters

labels

List<LabelElement>

The labels.

plotArea

Rectangle

The plot area.

isLeftColumn

bool

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

OptimizeCenterUpAndDown(List<LabelElement>, Rectangle, bool)

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

Declaration

cs-api-definition
protected virtual void OptimizeCenterUpAndDown(List<LabelElement> labels, Rectangle plotArea, bool isLeftColumn)

Parameters

labels

List<LabelElement>

The labels.

plotArea

Rectangle

The plot area.

isLeftColumn

bool

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

OptimizeColumnPositions(List<LabelElement>, Rectangle, bool)

Optimizes the labels positions in the two columns.

Declaration

cs-api-definition
protected virtual void OptimizeColumnPositions(List<LabelElement> column, Rectangle plotArea, bool isLeftColumn)

Parameters

column

List<LabelElement>

The column.

plotArea

Rectangle

The plot area.

isLeftColumn

bool

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

OptimizeTopDown(List<LabelElement>, Rectangle, bool)

Begind the optimization from the top and proceeds down.

Declaration

cs-api-definition
protected virtual void OptimizeTopDown(List<LabelElement> labels, Rectangle plotArea, bool isLeftColumn)

Parameters

labels

List<LabelElement>

The labels.

plotArea

Rectangle

The plot area.

isLeftColumn

bool

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

ToRectangleF(RadRect)

Converts a RadRect to a RectangleF.

Declaration

cs-api-definition
public Rectangle ToRectangleF(RadRect rect)

Parameters

rect

RadRect

The rect.

Returns

Rectangle