AutoScaleMode: MapAutoScaleMode;
AutoScaleMode: Prognoz.Platform.Interop.Map.MapAutoScaleMode;
The AutoScaleMode property determines auto calculation type for the report scale.
Before determining the calculation type, the IMapScale.AutoCalculable property needs to be set to True.
Executing the example requires that repository contains a regular report with the REPORT identifier where there is added color scale.
Add links to the Map, Metabase, Report system assemblies.
Sub UserProc;
Var
MB: IMetabase;
Report: IPrxReport;
MapScale: IMapColorScale;
Begin
// Get repository
MB := MetabaseClass.Active;
// Get regular report
Report := MB.ItemById("REPORT").Edit As IPrxReport;
// Get color scale
MapScale := Report.Scales.Item(0).MapScale As IMapColorScale;
// Set automatic calculation of scale values
MapScale.AutoCalculable := True;
// Set scale calculation method
MapScale.AutoScaleMode := MapAutoScaleMode.Uniform;
//Save changes
(Report As IMetabaseObject).Save;
End Sub UserProc;
Imports Prognoz.Platform.Interop.Map;
Imports Prognoz.Platform.Interop.Report;
…
Public Shared Sub Main(Params: StartParams);
Var
MB: IMetabase;
Report: IPrxReport;
MapScale: IMapColorScale;
Begin
// Get repository
MB := Params.Metabase;
// Get regular report
Report := MB.ItemById["REPORT"].Edit() As IPrxReport;
// Get color scale
MapScale := Report.Scales.Item[0].MapScale As IMapColorScale;
// Set automatic calculation of scale values
MapScale.AutoCalculable := True;
// Set scale calculation method
MapScale.AutoScaleMode := MapAutoScaleMode.masmUniform;
//Save changes
(Report As IMetabaseObject).Save();
End Sub;
The auto calculation of the Quantiles type values is set for the regular report scale.
See also: