VB.net图表打印不正确(VB.net chart printing incorrectly)
我在vb.net项目中有一个无法正确打印的图表。 它在程序中出现如下。 在节目中
但是,当打印到PDF或打印机时,它显示如下。 印刷的
如何打印系列标签,如程序中所示?
我的打印代码如下:
Private Sub cmdPrintResults_Click(sender As Object, e As EventArgs) Handles cmdPrintResults.Click printDialogFormUI.Document = printResults printResults.DefaultPageSettings.Landscape = True If printDialogFormUI.ShowDialog() = DialogResult.OK Then printResults.Print() End Sub Private Sub printResults_PrintPage(sender As Object, e As Printing.PrintPageEventArgs) Handles printResults.PrintPage ' Create Rectangle structure, used to set the position of the chart Dim myRec As New System.Drawing.Rectangle(0, 0, 1200, 800) chartResults.Printing.PrintPaint(e.Graphics, myRec) End Sub感谢你的协助
I have a chart in a vb.net project that will not print correctly. It appears in the program as follows. In program
However, when printed to PDF or a printer it appears as follows. Printed
How can I get the series labels to print as shown in the program?
My print code is provided below:
Private Sub cmdPrintResults_Click(sender As Object, e As EventArgs) Handles cmdPrintResults.Click printDialogFormUI.Document = printResults printResults.DefaultPageSettings.Landscape = True If printDialogFormUI.ShowDialog() = DialogResult.OK Then printResults.Print() End Sub Private Sub printResults_PrintPage(sender As Object, e As Printing.PrintPageEventArgs) Handles printResults.PrintPage ' Create Rectangle structure, used to set the position of the chart Dim myRec As New System.Drawing.Rectangle(0, 0, 1200, 800) chartResults.Printing.PrintPaint(e.Graphics, myRec) End SubThanks for your assistance
最满意答案
我通过使用注释并将它们锚定到数据点而不是为每个数据点添加标签来解决了这个问题。
I solved this issue by using annotations and anchoring them to the data points instead of adding labels to each data point.
更多推荐
发布评论