Graph on top of table

I want to highlight a section of a table using a rectangle with rounded corners. I'm having some problems getting the graph on top of the table in the pdf. The graph is just added to the end of the section and I'm a bit confused regarding the feasibility of placing a rectangle on top of an existing table. Is this possible to achieve?

Thanks in advance.

heed:

I'm a bit confused regarding the feasibility of placing a rectangle on top of an existing table. Is this possible to achieve?

Hello Henric,

Thanks for using our products.

Can you please share, either you are trying to add rectangle to a table in any existing PDF document or trying to place it over the table while generating the PDF document from scratch. If possible, please also share the code snippet that you are using, so that we can test the scenario at our end.

In case you are creating a PDF document from scratch, you can simply add the graph object (rectangle) to paragraphs collection of section, before the table is added. And you can specify proper coordinates to place the rectangle over correct position. For more related information, please visit Working with Graphs

We apologize for your inconvenience.

Aha, I think you hit the nail on the head here. I am indeed creating a pdf from scratch, but I tried adding the graph AFTER the table had been added. The thing here is that the section of the table that I want to have a graph around is not always shown. The table is always there, but on a certain condition only, the part of the table that I want to put a graph around is hidden. Also, the table is defined in xml, and I am trying to add the graph programatically after I check if the condition that decides if the part of the table that should have the graph around it should be shown. I suppose another way of doing this would be to add borders to the cells of the table, but that means I can’t have rounded corners which my client really, really likes. :slight_smile: It also necessitates using padding in the bordering cells to create some space. I hope that makes it a bit more clear.

Hello Henric,

Thanks for sharing the detailed information.

Can you please share the code snippet that you are using so that we can test the scenario at our end. We are really sorry for your inconvenience.