XY Chart NET 3 Control Reference
PrintChart Method

Use this method to print the chart image.  The chart image is scaled to fit the printable area based on the paper size and the PrintSettings properties.  The aspect ratio (height-to-width) is maintained.  The print dialog appears if PrintSettings.ShowDialog = True.

This method is equivalent to selecting the Print Chart button in the Toolbar.

Syntax
[Visual Basic]
Sub PrintChart()
[C#]
void XYChartNETCtl.PrintChart()
[C++]
void PrintChart()
       
Example
' XYChartNETCtl1 is the name of the XY Chart NET control instance placed on the form.

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
   With XYChartNETCtl1.PrintSettings
      .Color = False
      .Orientation = XYChartNet.XYChartNETCtl.PrintOrientationOptions.poLandscape
      .NumCopies = 1
      .DocumentName = "XYChartNET 1"
      .LeftMargin = 50
      .TopMargin = 100
      .ShowDialog = False  'Print dialog will not be displayed when the PrintChart method is called
   End With
End Sub

Private Sub Basic_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Basic.Click
   XYChartNETCtl1.PrintChart()
End Sub
                       
                       
See Also

 

 


© 2003 - 2013 ControlEng Corporation. All rights reserved.