Hi,

How can I insert a horizontal bar graph/chart into a PdfPCell? The cell
has a border already but the graph should possibly keep a little margin
to the inner cell border. Also, I'd need to determine the width of a
table cell so that I know how far my graph can go until it overflows.
The graph itself in a two-coloured bar. Green or orange up to 100% and
red for all that's above.

I've searched the Web and browsed the API docs but couldn't find an easy
way to accomplish this.

I've seen that I can insert an Image into a cell but that only seems to
support existing raster images. I mean I could go create such an image
at ease from .NET classes, but how would I pass them to iText and would
they provide good printing quality at reasonable file size?

Here's an example of what I'm thinking of:

+---------------+-----+-------------------+  (The table is 100 % of
| Topic 1       |  50 | XXXXX             |  the inner page width,
+---------------+-----+-------------------+  column widths are
| Topic 2       | 100 | XXXXXXXXXX        |  specified as fractions,
+---------------+-----+-------------------+  like [3, 1, 4].)
| Topic 3       | 130 | XXXXXXXXXX###     |
+---------------+-----+-------------------+
| Topic 4       | 280 | XXXXXXXXXX#####/# |
+---------------+-----+-------------------+

X is green or orange
# is red
/ could be some break indicator, I'm using a big white slash in HTML

I could live with 100 % being scaled to 50% of the cell width if that
makes it easier.

-- 
Yves Goergen "LonelyPixel" <[email protected]>
Visit my web laboratory at http://beta.unclassified.de


------------------------------------------------------------------------------

_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.itextpdf.com/book/
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/

Reply via email to