property ChartView.ChartHeight as Long
Retrieves the height in pixels to display the entire chart.

TypeDescription
Long A long expression that specifies the height in pixels required to display the entire chart.
The ChartHeight property gets the height in pixels required to display the entire chart. The ChartHeight property does not retrieve the size of the borders. The ChartWidth property specifies the width in pixels required to display the entire chart. Use the Appearance property to remove the control's appearance. Use the BorderWidth property to specify the width in pixels of the control's empty border ( in the left or right side ). Use the BorderHeight property to specify the height in pixels of the control's empty border ( in the top or bottom side ). The ChartWidth and ChartHeight properties does NOT include the size of the control's borders ( if the Appearance property is not 0 ). Use the Appearance property on 0, or add 4 pixels, if you are using the Appearance property on not zero.

The following VB sample resizes the control so the entire chart is display ( no scroll bars are displayed ):

Private Sub autoSize()
    With ChartView1
        Dim nMode As ZoomModeEnum
        nMode = .ZoomWidthMode
        .BeginUpdate
            .Width = (2 * .BorderWidth + .ChartWidth) * Screen.TwipsPerPixelX
            .Height = (2 * .BorderHeight + .ChartHeight) * Screen.TwipsPerPixelY
            .ZoomWidthMode = exControlSize
            .ZoomHeightMode = exControlSize
        .EndUpdate
        .ZoomWidthMode = nMode
        .ZoomHeightMode = nMode
    End With
End Sub

The following VB.NET sample resizes the control so the entire chart is display ( no scroll bars are displayed ):

Private Sub ASize()
    With Chartview1
        Dim nMode As exontrol.EXORGCHARTLib.ZoomModeEnum = .ZoomWidthMode
        .BeginUpdate()
        .Width = 2 * Chartview1.BorderWidth + Chartview1.ChartWidth
        .Height = 2 * Chartview1.BorderHeight + Chartview1.ChartHeight
        .ZoomWidthMode = exontrol.EXORGCHARTLib.ZoomModeEnum.exControlSize
        .ZoomHeightMode = exontrol.EXORGCHARTLib.ZoomModeEnum.exControlSize
        .EndUpdate()
        .ZoomWidthMode = nMode
        .ZoomHeightMode = nMode
    End With
End Sub

The following C# sample resizes the control so the entire chart is display ( no scroll bars are displayed ):

private void autoSize()
{
    exontrol.EXORGCHARTLib.ZoomModeEnum nMode = chartview1.ZoomWidthMode;
    chartview1.BeginUpdate();
    chartview1.Width = 2 * chartview1.BorderWidth + chartview1.ChartWidth;
    chartview1.Height = 2 * chartview1.BorderHeight + chartview1.ChartHeight;
    chartview1.ZoomWidthMode = exontrol.EXORGCHARTLib.ZoomModeEnum.exControlSize;
    chartview1.ZoomHeightMode = exontrol.EXORGCHARTLib.ZoomModeEnum.exControlSize;
    chartview1.EndUpdate();
    chartview1.ZoomWidthMode = nMode;
    chartview1.ZoomHeightMode = nMode;
}