property ChartView.ZoomWidthMode as ZoomModeEnum
Specifies a value that indicates whether the ZoomWidth property is updated when the control is resized.

 TypeDescription 
   ZoomModeEnum A ZoomModeEnum expression that indicates whether the ZoomWidth property is updated when the control is resized.  

By default, the ZoomWidthMode property is exDefaultSize. If the ZoomWidthMode property is exCustomSize the ZoomWidth property specifies how large the chart will appear on the horizontal axis.  If the ZoomWidthMode property is exControlSize the control updates the ZoomWidth property such that the chart will fit the control's client are on horizontal axis. Use the ZoomHeightMode property to specify whether the ZoomHeight property is updated when the control is resized.

The following VB sample fits the chart to the control's client area:

With ChartView1
        .BeginUpdate
            .ZoomWidthMode = exControlSize
            .ZoomHeightMode = exControlSize
        .EndUpdate
End With

The following C++ sample fits the chart to the control's client area:

m_chartview.BeginUpdate();
m_chartview.SetZoomWidthMode( 2 /*exControlSize*/ );
m_chartview.SetZoomHeightMode( 2 /*exControlSize*/ );
m_chartview.EndUpdate();

The following VB.NET sample fits the chart to the control's client area:

With AxChartView1
    .BeginUpdate()
    .ZoomWidthMode = EXORGCHARTLib.ZoomModeEnum.exControlSize
    .ZoomHeightMode = EXORGCHARTLib.ZoomModeEnum.exControlSize
    .EndUpdate()
End With

The following C# sample fits the chart to the control's client area:

axChartView1.BeginUpdate();
axChartView1.ZoomWidthMode = EXORGCHARTLib.ZoomModeEnum.exControlSize;
axChartView1.ZoomHeightMode = EXORGCHARTLib.ZoomModeEnum.exControlSize;
axChartView1.EndUpdate();

The following VFP sample fits the chart to the control's client area:

With thisform.ChartView1
	.BeginUpdate
	.ZoomWidthMode = 2 && exControlSize
	.ZoomHeightMode = 2 && exControlSize
	.EndUpdate
EndWith

Send comments on this topic.
1999-2016 Exontrol.COM, Software. All rights reserved.