New to Telerik UI for WinForms? Start a free 30-day trial

Applies Cartesian viewport and plot-origin offsets to point-label slots and connector endpoints.

Definition

Constructors

Creates a point-label draw part for the specified series and renderer.

C#
public PointLabelElementDrawPart(ChartSeries element, IChartRenderer renderer)
Parameters:elementChartSeries

The series whose point labels are drawn.

rendererIChartRenderer

The renderer that supplies the drawing surface and viewport offsets.

Methods

Adds Cartesian viewport offsets to the label slot when the renderer is Cartesian.

C#
protected override RadRect AdjustLayoutSlot(RadRect rect, DataPointElement point)
Parameters:rectRadRect

The label slot before renderer offsets are applied.

pointDataPointElement

The point element whose label is positioned.

Returns:

RadRect

The label slot adjusted for the Cartesian viewport, or unchanged for other renderers.

Overrides: LabelElementDrawPart.AdjustLayoutSlot(RadRect, DataPointElement)

Gets the label-side connector endpoint, translating ordinary labels by viewport and plot-origin offsets.

C#
protected override PointF GetLineEnd(LabelElement label, DataPointElement point, bool isSmartLabel)
Parameters:labelLabelElement

The label connected to the point.

pointDataPointElement

The point element associated with the label.

isSmartLabelbool

Whether the label uses a smart-positioned rectangle.

Returns:

PointF

The label-side connector endpoint in renderer coordinates.

Overrides: LabelElementDrawPart.GetLineEnd(LabelElement, DataPointElement, bool)

Gets the connector origin by adding the viewport and plot-origin offsets to the point's base line start.

C#
protected override PointF GetLineStart(LabelElement label, DataPointElement point, bool isSmartLabel)
Parameters:labelLabelElement

The label connected to the point.

pointDataPointElement

The point element that supplies the data-point layout.

isSmartLabelbool

Whether smart-label placement is active; the origin still uses the point layout.

Returns:

PointF

The point-side connector start in renderer coordinates.

Overrides: LabelElementDrawPart.GetLineStart(LabelElement, DataPointElement, bool)