Drawing very simple tables with little rectangles as icons for a simple bar chart:
Would like to allow user to copy the table to clipboard (e.g. to a doc, spreadsheet) with both the numbers and if possible, the rectangles.
I like how the natural select-copy-paste works well for the numbers in the table, copying them intelligently to Excel, PPT, Word etc. as HTML and Notepad/TextEdit as plain text.
But might there be a way to copy the bars as well? I’m mentally imagining it pasting as an HTML table that looks kind of like this, or to Excel with a shape in the corresponding cells. I tried three ways:
- Div:
<div style="width: 100px; height: 10px; background-color:#AAA;"></div> - Img:
<img src="http://www.moneteam.com/images/BlueRectangle.jpg" height="12px" width="100px"/> - SVG:
<rect x=80 y=10 width=100 height=12 fill="#A44"/>
With Div and Img, the numbers copy great as tables, but not the bars. With SVG again just the numbers copy, but just as a line of numbers.
Mainly looking for a hint for a likely workable approach, not expecting someone to program it for me. If its not possible to do that, that would be good to know as well.
Unlike most of the threads I can find, ctrl+C/cmd+C is fine, it needn’t be programmatically placed on clipboard. And if it didn’t work on every last browser that could be okay too.
you can try this….
u can try to apply some css property to make it beautiful 🙂