SecondaryGapWidthCoef: Double;
SecondaryGapWidthCoef: double;
The SecondaryGapWidthCoef property determines gap width size of columns built on the secondary axis.
Range of available values: [0; 5].
Executing the example requires that the repository contains a regular report with the REG_REP_SSA identifier. The report contains only a chart with two data series built on secondary axis.
Add links to the Chart, Metabase, Report, Tab system assemblies.
Sub UserProc;
Var
MB: IMetabase;
Report: IPrxReport;
Tab: ITabSheet;
Chart: IChart;
Begin
// Get access to repository
MB := MetabaseClass.Active;
// Get access to regular report
Report := MB.ItemById("REG_REP_SSA").Edit As IPrxReport;
// Get regular report table
Tab := (Report.Sheets.Item(0) As IPrxTable).TabSheet;
// Get chart
Chart := Tab.Objects.Item(0).Extension As IChart;
// Determine whether secondary axis is displayed
Chart.SeparateSecondaryAxis := True;
// Change gap width and overlap of columns on secondary axis
Chart.SecondaryGapWidthCoef := 2.0;
Chart.SecondaryOverlapCoef := -1.0;
(Report As IMetabaseObject).Save;
End Sub UserProc;
After executing the example, gap width between columns and column overlap size built on secondary axis will be changed in a regular report. The console window displays displays initial value of gap width and overlap size.
The requirements and result of the Fore.NET example execution match with those in the Fore example.
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;
Tab: ITabSheet;
Chart: IChart;
Begin
// Get access to repository
MB := Params.Metabase;
// Get access to regular report
Report := MB.ItemById["REG_REP_SSA"].Edit() As IPrxReport;
// Get table of regular report
Tab := (Report.Sheets.Item[0] As IPrxTable).TabSheet;
// Get chart
Chart := Tab.Objects.Item[0].Extension As IChart;
// Determine whether secondary axis is displayed
Chart.SeparateSecondaryAxis := True;
// Change gap width and column overlap on the secondary axis
Chart.SecondaryGapWidthCoef := 2.0;
Chart.SecondaryOverlapCoef := -1.0;
(Report As IMetabaseObject).Save();
End Sub;
See also: