IChartSeries.AutoplaceLabels

Syntax

AutoplaceLabels;

Description

The AutoplaceLabels method locates data labels to avoid their overlapping.

Comments

The correct execution of the method requires all labels of the chart to be rendered. On rendering, size of labels which are required for its correct layout is calculated. If the dynamic creation of a chart with labels is executed, execute the preliminary rendering by the appropriate method depending on the chart location:

  1. A chart is dynamically located on the Fore form. Use the methods: IFormControl.BeginUpdate/IFormControl.EndUpdate or ITabSheet.BeginUpdate/ITabSheet.EndUpdate, this results in rendering of a data label with fitting position.

  2. The chart is dynamically located on a regular report sheet. Use IChartExporter.GetBitmap after previous passing exact size of the chart (IChartExporter.PixelHeight and IChartExporter.PixelWidth).

Below is the example of data labels layout without auto layout (left) and with auto layout (right):

See also:

IChartSeries