Op 12/03/2012 12:28, Adrian Taylor schreef:
I need to create a scatter plot graph using iText, but can't find the
information on how to do this is the "iText in Action" book. Can
anyone help?
I know what size my graph is and I can work out the various points
that I need. What I can't work out is how to create the graph.
You need to draw lines and plot points by writing to the "direct content".
The principle of "writing to the direct content" is explained in Chapter 3.
The methods you need to draw the lines and dots are listed in Chapter 14.
Note that it may be a good idea not to write straight to the page.
If you know the dimensions of the graph, I'd create a PdfTemplate (will
result in an XObject in your PDF).
This gives you two benefits: you can work with a coordinate system where
the lower left corner has x=0; y=0.
You can wrap the PdfTemplate in an Image object (vector data) so that
it's easier to position and reuse the chart.
------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples:
http://itextpdf.com/themes/keywords.php