IChartGraphArea.AutoMargin

Fore Syntax

AutoMargin: Boolean;

Fore.NET Syntax

AutoMargin: System.Boolean;

Description

The AutoMargin property determines values of automatic margins for the chart plot area.

Comments

By default AutoMargin is set to True. The margin values for the chart objects are 1 mm.

This property is saved with the chart. If an object from the previous version is loaded, the AutoMargin and Margin properties are set by default.

Fore Example

To execute this example, create a form with a button named Button1 on the form, the ChartBox component and the UiChart component that is a data source.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
    c: IChart;
Begin
    c:= UiChart1.Chart;
    c.GraphArea.Margin:= New GxRectF.Create(0000);
    c.GraphArea.AutoMargin:= False;
End Sub Button1OnClick;

Clicking the Button1 button sets the distance from the plot area (including labels and axes) to the chart edges that is equal to zero.

Fore.NET Example

To execute this example, create a form with a button named button1, the ChartBoxNet component and the UiChartNet component that is a data source.

...

Imports Prognoz.Platform.Forms.Net;
Imports Prognoz.Platform.Interop.Metabase;
Imports Prognoz.Platform.Interop.Chart;
Imports Prognoz.Platform.Interop.Drawing;

Private Sub button1_Click( sender : System.Object; e : System.EventArgs );
    Var
      c: IChart;
      rect:GxRectF;
    Begin
        c:= UiChartNet1.ChartUi.Chart;
        rect:= New GxRectFClass();
        rect.Create(0,0,0,0);
        c.GraphArea.Margin:= rect;
        c.GraphArea.AutoMargin:= False;
    End Sub;

Clicking the button1 button sets the distance from the plot area (including labels and axes) to the chart edges that is equal to zero.

See also:

IChartGraphArea