AutoRotateMarker: Boolean;
AutoRotateMarker: boolean;
The AutoRotateMarker property determines whether a chart contains the auto rotation of marker.
To use the AutoRotateMarker property, set the IChartMarker.MarkerType property to TriangleUp/TriangleDown/Rhombus or select the marker type Triangular/Inverse triangular/Diamond on the charts:
Linear.
Scatter.
Radar.
Stepped.
Depending on the value change of the chart line series, the marker rotation angle changes dynamically.
Executing the example requires a regular report with the REGULAR_REPORT identifier that contains a line chart with two data series and markers as a triangle.
Add links to the Chart, Metabase, Report, Tab system assemblies in the unit.
Sub UserProc;
Var
Mb: IMetabase;
Report: IPrxReport;
Sheet: ITabSheet;
Chart: IChart;
Begin
// Get current repository and regular report
Mb := MetabaseClass.Active;
Report := MB.ItemById("REGULAR_REPORT").Edit As IPrxReport;
// Get report chart
Sheet := (Report.Sheets.Item(0) As IPrxTable).TabSheet;
Chart := Sheet.Objects.Item(0).Extension As IChart;
Chart.Series.DefaultSerie.ResetInheritance(ChartSeriePropertyInheritance.AutoRotateMarker);
// Set auto rotation of markers on chart
Chart.AutoRotateMarker := True;
// Save regular report
(Report As IMetabaseObject).Save;
End Sub UserProc;
After executing the example auto rotation of markers in the graph direction is set on the regular report chart.
The requirements and result of the Fore.NET example execution match with those in the Fore example.
Imports Prognoz.Platform.Interop.Metabase;
Imports Prognoz.Platform.Interop.Chart;
Imports Prognoz.Platform.Interop.Report;
Imports Prognoz.Platform.Interop.Tab;
Public Shared Sub Main(Params: StartParams);
Var
Mb: IMetabase;
Report: IPrxReport;
Sheet: ITabSheet;
Chart: IChart;
Begin
// Get current repository and regular report
Mb := Params.Metabase;
Report := MB.ItemById["REGULAR_REPORT"].Edit() As IPrxReport;
// Get report chart
Sheet := (Report.Sheets.Item[0] As IPrxTable).TabSheet;
Chart := Sheet.Objects.Item[0].Extension As IChart;
Chart.Series.DefaultSerie.ResetInheritance(ChartSeriePropertyInheritance.cspiAutoRotateMarker);
// Set auto rotation of markers on chart
Chart.AutoRotateMarker := True;
// Save regular report
(Report As IMetabaseObject).Save();
End Sub;
See also: