AutoRotateMarker: Boolean;
AutoRotateMarker: Boolean;
The AutoRotateMarker property determines whether a chart contains the auto rotation of marker for data series.
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 containing linear 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;
// Set auto rotation of markers for data series
Chart := Sheet.Objects.Item(0).Extension As IChart;
Chart.Series.Item(0).AutoRotateMarker := True;
Chart.Series.Item(1).AutoRotateMarker := True;
// Save regular report
(Report As IMetabaseObject).Save;
End Sub UserProc;
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;
// Set auto rotation of markers for data series
Chart := Sheet.Objects.Item[0].Extension As IChart;
Chart.Series.Item[0].AutoRotateMarker := True;
Chart.Series.Item[1].AutoRotateMarker := True;
// Save regular report
(Report As IMetabaseObject).Save();
End Sub;
After executing the example, the marker direction depends on series value on the regular report chart.
See also: