PDA

View Full Version : [CLOSED] Exporting 2 Charts with html table to single PNG



PriceRightHTML5team
Oct 09, 2014, 2:30 PM
Hi,

I have 2 charts and Grid panel giving chart details,i have retrieved both the charts SVG and by combining these SVGs, i have converted it to PNG with the help of below post which i had posted earlier.

http://forums.ext.net/archive/index.php?t-27293.html

Now my as per requirement i also want to export Grid Panel with these charts into Single png.

Below is snapshot of charts & Grid panel which i want to convert to PNG
http://forums.ext.net/attachment.php?attachmentid=15471&stc=1

I have used the same technique, converted html table to SVG corresponding Grid Panel data and combined these chart & table SVGs into single, but html table is not getting display in converted PNG image with charts

Below is sample SVG table of Grid Panel




<svg>
<foreignObject width="500" height="150">
<table style=" border-collapse:collapse" border="1">
<tr>
<th></th>
<th>P-22</th>
<th>IRP</th>
<th>Diff</th>
<th>Percent</th>
</tr>
<tr>
<td>Median NPV</td>
<td>51K</td>
<td>4.2K</td>
<td>46</td>
<td>90%</td>

</tr>
<tr>
<td>Discounting Rate</td>
<td>2%</td>
<td>30%</td>

</tr>

</table>
</foreignObject>
<svg>



So can you please tell me what i am doing wrong or is there any possibility to convert Ext.net Gridpanel to PNG ?

Thanks

Daniil
Oct 10, 2014, 8:59 AM
Hi @PriceRightHTML5team,


So can you please tell me what i am doing wrong

Well, it is hard to determine. You say "what" you are doing, but you don't say "how" you are doing that.

For example, I have no idea how you are doing the following:

I have used the same technique, converted html table to SVG corresponding Grid Panel data


is there any possibility to convert Ext.net Gridpanel to PNG ?

Probably, there is. At least, you somehow convert HTML table to SVG, don't you? As for Ext.NET, there is no any special functionality for that. But I guess it is quite common requirement - converting the HTML markup to an image - and, I guess, there is a possibility to find some information on the internet. You can always deal with a GridPanel on the HTML level. Well, as you've already started to do.

PriceRightHTML5team
Oct 10, 2014, 9:13 AM
ok Daniil,

Thanks..