PrintChart method (XY Plot object)
Prints the XY Plot chart.
Syntax
XYPlot1
.PrintChart
([specifyFilePath
],[useLandscapeMode
])where
XYPlot1
- is the name of an XY Plot object or an expression that evaluates to an XY Plot object.specifyFilePath
- is a parameter of the type String that specifies the full path of the PDF file to save the printed chart.useLandscapeMode
- is a parameter of the type Boolean that can be set to one of the following:- True. Prints the chart in landscape format (wide).
- False. Prints the chart in portrait format (tall).
The
specifyFilePath
and useLandscapeMode
parameters are optional.- If you omit them, the syntaxTrendPro1.PrintChartwill open a print dialog box and allows you to select a printer.
- If you specify them, the syntaxTrendPro1.PrintChart([specifyFilePath],[useLandscapeMode]) will print the chart to a PDF file without any user interaction. In this case, you can omit theuseLandscapeModeparameter, which will print the chart in landscape format by default.
Example
This example sends the print command directly to the default printer.
Private Sub btnPrintChart() XYPlot1.PrintChart End Sub
This example prints the chart in landscape format in the PrintChart.pdf file, which is saved in C:\Users\Public\Documents.
Private Sub btnPrintChart() XYPlot1.PrintChart "C:\Users\Public\Documents\PrintChart.pdf", True End Sub
Provide Feedback