DisplayStacked: Boolean;
DisplayStacked: Boolean;
The DisplayStacked property determines whether a series is stacked depending on its type and binding to the primary or secondary axes.
The property is relevant only for stacked mixed charts and percentage charts. When this property is set for the series, it is also set for all the series of the same type bound to the same axis.
The property is saved together with the chart.
To execute this example, create a regular report with the Rep1 identifier with a stacked mixed chart on its sheet. The chart contains bar series bound to the secondary axis. The inspector of unit assemblies should contain links to the Chart, Report, Tab and Metabase system assemblies.
Sub UserProc;
Var
mb:IMetabase;
report:IPrxReport;
chart:IChart;
serie:IChartSerie;
Begin
mb:= MetabaseClass.Active;
report:= mb.ItemById("Rep1").Edit As IPrxReport;
report.Recalc;
chart:= (report.ActiveSheet As IPrxTable).TabSheet.Objects.Item(0).Extension As IChart;
For Each serie In chart.Series Do
If (serie.SerieType=ChartSerieType.Bars) And (serie.AtSecondaryAxis=True) Then
serie.DisplayStacked:= False;
Break;
End If;
End For;
(report As IMetabaseObject).Save;
End Sub UserProc;
After executing the example, the bar series bound to the secondary axis become unstacked.
To execute this example, create a regular report with the Rep1 identifier with a stacked mixed chart on its sheet. The chart contains bar series bound to the secondary axis. The inspector of unit assemblies should contain links to the Chart, Report and Tab system assemblies.
Imports Prognoz.Platform.Interop.Metabase;
Imports Prognoz.Platform.Interop.Report;
Imports Prognoz.Platform.Interop.Chart;
Imports Prognoz.Platform.Interop.Tab;
...
Public Shared Sub Main(Params: StartParams);
Var
mb:IMetabase;
report:IPrxReport;
chart:IChart;
serie:IChartSerie;
Begin
mb:= Params.Metabase;
report:= mb.ItemById["Rep1"].Edit() As IPrxReport;
report.Recalc();
chart:= (report.ActiveSheet As IPrxTable).TabSheet.Objects.Item[0].Extension As IChart;
For Each serie In chart.Series Do
If (serie.SerieType=ChartSerieType.cstBars) And (serie.AtSecondaryAxis=True) Then
serie.DisplayStacked:= False;
Break;
End If;
End For;
(report As IMetabaseObject).Save();
End Sub;
After executing the example, the bar series bound to the secondary axis become unstacked.
See also: