ComponentOne Chart 8.0 for ActiveX
Printing a Chart

 

Printing a Chart

To print a chart using the standard Windows Print dialog, use the PrintChart method. This method allows you to specify the image format and the size and position of the chart.

 

oc3dScaleNone

Uses pixel count matching the screen display.

oc3dScaleToFit

Maximizes the size of the chart within the rectangle specified by left, top, width, and height without changing the aspect ratio of the screen display.

oc3dScaleToWidth

Scales the chart without changing the aspect ratio so that the width of the chart matches the width specified by the width argument.

oc3dScaleToHeight

Scales the chart without changing the aspect ration so that the height of the chart matches the height specified by the height argument.

oc3dScaleToMax

Scales the width to match the width argument, scales the height to match the height argument, and allows the aspect ratio to change.

Width

If this value is zero, then the width is set to the number of pixels in the width of the device (printer).

Height

If this value is zero, then the height is set to the number of pixels in the height of the device (printer).

 

The following code example illustrates how to print a chart:

' Prints the chart as a Windows bitmap scaled to fit the entire_

'page without changing the aspect ratio

Chart3D1.PrintChart oc3dFormatBitmap, oc3dScaleToFit, 0, 0, 0, 0

 

'Prints the chart as a Windows bitmap scaled to fit the entire_

'page, filling both the height and width

Chart3D1.PrintChart oc3dFormatBitmap, oc3dScaleToMax, 0, 0, 0, 0

 

 


Copyright (c) GrapeCity, inc. All rights reserved.

Product Support Forum  |  Documentation Feedback