VB.net图表打印不正确(VB.net chart printing incorrectly)

编程入门 行业动态 更新时间:2024-10-24 14:22:46
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 Sub

Thanks 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.

更多推荐

本文发布于:2023-08-05 07:55:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1428798.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:图表   不正确   net   VB   printing

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!