Link to home
Start Free TrialLog in
Avatar of Roger
RogerFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Placing HTML line and rectangle shapes to X1y1X2Y2 coordinates within one HTML table cell

I have an HTML table with cells containing various types of content. In ONE large cell, I need to place some line rectangles, and some arrowed lines, arranged as a flowchart. Lines
start at the edge of defined rectangles and terminate, with an arrow head, on the edge of other rectangles.  The xy coordinates of each rectangle and line are known, referenced to a corner of the cell. How do I write this HTML?

Thanks, Kelvin4
Avatar of OmniUnlimited
OmniUnlimited
Flag of United States of America image

My guess is that if you want to do this nicely, you will need to use images.  Is there a reason you couldn't make up the flowchart in some graphics program, say Photoshop or Illustrator, and simply place the image inside your large cell?

Or is this something that you are trying to change dynamically?

Either way, I'd say you would have to use images to acheive this effect.
SOLUTION
Avatar of Gurvinder Pal Singh
Gurvinder Pal Singh
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Roger

ASKER

Thanks, Omni..
I agree with your core response, however, as you suspected, I AM working with dynamic data-driven content, so images are not a solution in this case. A high level of artistic precision is not required.

The number and position of each element varies and can only be defined by coordinates.  HTML and other content data is packaged as ASCII code into json, and sent off to a functional web-based DB which unpacks the data and renders it as the HTML I now need to write, so it appears in the browser.

Thanks, Gurvinder:
I have been trying to find HTML examples of using div borders in cells in the way you indicate, but my searches were ineffective. Can you reference or send me an example, please?

With appreciation for your rapid responses..
Kelvin4
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
OK, so I take it from your response that the json packet contains x,y coordinates that have to be translated into your td?  How are you handling this?

Do rectangles have four sets of coordinates?  The lines two?  What sort of coding do you put for the direction the arrow is pointing?  Are rectangles and lines the only flow chart shapes you are using?

What sort of scripting language do you have available to generate your HTML?  PHP has some imaging capabilities using coordinates.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Roger

ASKER

Hi Curvinder:
My HTML is weak:
Here is the HTML for a small table. I want to position a graphic in the cell labelled "Graphic here", at a specific px position from the top left corner of that cell, say 30px right and 20px down.

Could you enter your div-based syntax into the HTML below, so I can see how to use the HTML effectively?

<table border="1">
<tr>
  <th>Header</th>
  <td>Item A</td>
</tr>
<tr>
  <th rowspan="2">Graphic here</th>
  <td>Item B</td>
</tr>
<tr>
  <td>Item C</td>
</tr>
</table>

With many thanks
Kelvin
Avatar of Roger

ASKER

Thanks Gurvinder,
I'm going to close the question here and submit a further question which is a bit more detailed and hopes you will fit your div solution (above) within the framework of my simple HTML tags (above). Can you help me further
Regards,
Kelvin
Avatar of Roger

ASKER

ok by Kelvin