IChartLabel.ResetChildrenInheritance

Syntax

ResetChildrenInheritance(Value: ChartLabelPropertyInheritance);

Description

The ResetChildrenInheritance method resets settings of all chart labels.

Comments

After the chart label intersections that were moved by the IChartSeries.AutoplaceLabels method are excluded, position settings are changed. The ResetChildrenInheritance method is used to return default position settings for all chart labels.

Example

Executing the example requires that the form contains the Button component with the Button1 identifier, a regular report with the REPORT identifier, and also a chart with labels.

Add links to the Chart, Drawing, Report, Tab system assemblies.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
    MB: IMetabase;
    Rep: IPrxReport;
    Chart: IChart;
    Tab: ITabSheet;
    CLabel: IChartLabel;
Begin
    MB := Metabaseclass.Active;
    Rep := MB.ItemById(
"REPORT").Edit As IPrxReport;
    Tab := (rep.ActiveSheet 
As IPrxTable).TabSheet;
    Chart := Tab.Objects.Item(
0As IChart;
    CLabel := Chart.Series.DefaultSerie.DefaultLabel;
    Tab.BeginUpdate;
    CLabel.ResetChildrenInheritance(ChartLabelPropertyInheritance.Position);
    Tab.EndUpdate;
End Sub Button1OnClick;

After executing the example, after the button is clicked, position settings for all chart labels are reset.

See also:

IChartLabel