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

Creates a new instance of SmartLabelsController which handles the smart labels placement in RadChartView.

Definition

Constructors

Initializes a new instance of the SmartLabelsController class.

C#
public SmartLabelsController()

Properties

Gets or sets the strategy used for resolving label collisions.

C#
public SmartLabelsStrategyBase Strategy { get; set; }
Property Value:

The strategy.

Methods

Calculates the labels positions using the current strategy.

C#
public virtual void CalculateLabelsPositions(ChartSeriesCollection series, Rectangle plotArea)
Parameters:seriesChartSeriesCollection

All the series in the chart view.

plotAreaRectangle

The plot area.

This method is called when the controller is added to the controllers collection of an area.

C#
protected override void ControllerAdded(ChartView view)
Parameters:viewChartView

The view.

Overrides: ChartViewController.ControllerAdded(ChartView)

This method is called when the controller is removed from the controllers collection of an area.

C#
protected override void ControllerRemoved()

Overrides: ChartViewController.ControllerRemoved()

Gets the default strategy for a given area type.

C#
protected virtual SmartLabelsStrategyBase GetDefaultStrategy(ChartArea area)
Parameters:areaChartArea

The area.

Returns:

SmartLabelsStrategyBase

The default strategy for the given area.

Registers a custom strategy with a list of compatible series. Custom strategies inheriting the FourPositionsLabelsStrategy, EightPositionsLabelsStrategy, PieTwoLabelColumnsStrategy, or the VerticalAdjusmentLabelsStrategy strategy may not be registered as they can use the compatible series for their base type.

C#
public virtual void RegisterCustomStrategyWithSeries(Type type, List<Type> series = null)
Parameters:typeTypeseriesList<Type>
C#
protected virtual void UpdateDefaultStrategies(Type newStrategy)
Parameters:newStrategyType