IChartLabel.ResetChildrenInheritance

Syntax

ResetChildrenInheritance(Value: ChartLabelPropertyInheritance);

ResetChildrenInheritance(Value: Prognoz.Platform.Interop.Chart.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;

Imports Prognoz.Platform.Interop.Chart;
Imports Prognoz.Platform.Interop.Drawing;
Imports Prognoz.Platform.Interop.Metabase;
Imports Prognoz.Platform.Interop.Report;
Imports Prognoz.Platform.Interop.Tab;

Private Sub button1_Click(sender: System.Object; e: System.EventArgs);
Var
    MB: IMetabase;
    Rep: IPrxReport;
    Chart: IChart;
    Tab: ITabSheet;
    CLabel: IChartLabel;
Begin
    MB := Self.Metabase;
    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.clpiPosition);
    Tab.EndUpdate();
End Sub;

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

See also:

IChartLabel