Jump to content

Recommended Posts

Posted

Como posso imprimir um chart atraves de um PrintDocument?

Eu tentei assim, mas nao me aparece nada na folha


Dim Chart1 = New DataVisualization.Charting.Chart()
       ' Create and initialize print font 
       Dim printFont As New System.Drawing.Font("Arial", 16)
       ' Create Rectangle structure, used to set the position of the chart 
       Dim myRec As New System.Drawing.Rectangle(10, 30, 150, 150)
       ' Draw a line of text, followed by the chart, and then another line of text 
       e.Graphics.DrawString("Line before chart", printFont, Brushes.Black, 10, 10)
       Chart1.Printing.PrintPaint(e.Graphics, myRec)
       e.Graphics.DrawString("Line after chart", printFont, Brushes.Black, 10, 200)

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.