ResetInheritance(Value: ChartLabelPropertyInheritance);
The ResetInheritance method resets settings of specific chart label.
After the chart label intersections that were moved by the IChartSeries.AutoplaceLabels method are excluded, position settings are changed. The ResetInheritance method is used to return default position settings for specific chart label.
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;
Series: IChartSeries;
CLabel: IChartLabel;
Begin
MB := Metabaseclass.Active;
Rep := MB.ItemById("REPORT").Edit As IPrxReport;
Tab := (Rep.ActiveSheet As IPrxTable).TabSheet;
Chart := Tab.Objects.Item(0) As IChart;
Series := Chart.Series;
CLabel := Series.Item(0).Label(0);
Tab.BeginUpdate;
CLabel.ResetInheritance(ChartLabelPropertyInheritance.Position);
Tab.EndUpdate;
End Sub Button1OnClick;
After executing the example, after the button is clicked, position settings for specific chart label are reset.
See also: