ResetInheritance(Value: ChartLabelPropertyInheritance);
ResetInheritance(Value: Prognoz.Platform.Interop.Chart.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;
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;
Series: IChartSeries;
CLabel: IChartLabel;
Begin
MB := Self.Metabase;
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.clpiPosition);
Tab.EndUpdate();
End Sub;
After executing the example, after the button is clicked, position settings for specific chart label are reset.
See also: