IChart.ZoomMode

Syntax

ZoomMode: ChartZoomMode;

Description

The ZoomMode property determines a scale type.

Comments

The default scale type is AxisXY, that is, the object is scaled along the X and Y axes.

Before selecting the scale type you need to set appropriate interactive mode: set the InteractiveMode property to Zoom.

Fore Example

To execute the example, create a regular report with a chart on the report sheet. A unit is added to the report which can be used to call the GetZoom procedure using the hyperlink. Add links to the Chart, Report, Tab system assemblies.

Sub GetZoom;
Var
    Chart: IChart;
Begin
    Chart := PrxReport.ActiveReport.ActiveSheet.Table.Objects.Item(0).Extension As IChart;
    Chart.InteractiveMode := ChartInteractiveMode.Zoom;
    Chart.ZoomMode := ChartZoomMode.AxisY;
End Sub GetZoom;

After executing the example the scale mode is set, and the object is scaled only along the Y axis.

Fore.NET Example

Executing the example requires a regular report with the REGULAR_REPORT identifier, the report contains a chart. Add the component to the form: Button, UiChartNet, ChartBoxNet named button1, uiChartNet1, chartBoxNet1, respectively. Add links to the Metabase, Report, Chart, Tab system assemblies.

Imports Prognoz.Platform.Interop.Metabase;
Imports Prognoz.Platform.Interop.Report;
Imports Prognoz.Platform.Interop.Chart;
Imports Prognoz.Platform.Interop.Tab;

Private Sub button1_Click(sender: System.Object; e: System.EventArgs);
Var
    Report: IPrxReport;
    Sheet: IPrxSheet;
    PrxTable: IPrxTable;
    TabSheet: ITabSheet;
    Chart: IChart;
    MB: IMetabase;
Begin
    MB := Self.Metabase;
    Report := MB.ItemById["REGULAR_REPORT"].Edit() As IPrxReport;
    Sheet := Report.Sheets.Item[0];
    PrxTable := Sheet As IPrxTable;
    TabSheet := PrxTable.TabSheet;
    Chart := TabSheet.Objects.Item[0].Extension As IChart;
    Chart.InteractiveMode := ChartInteractiveMode.ciamZoom;
    Chart.ZoomMode := ChartZoomMode.czmmAxisY;
    chartBoxNet1.CtrlBox.Chart := Chart As DxChart;
End Sub;

The form displays a regular report chart, and the Only by X Axis scale mode is set.

See also:

IChart