I have a requirement where to export HTML table and high chart as a image.
Currently there is a toggle button , on click of which the system will show either the legend or HTML table (in the place of the legend) and on click of the toggle button , the chart should be printed / exported either with the legend or HTML table (which ever is toggled).
Printing is achieved using jquery.printElement plugin. I am trying to do so for exporting as well. Tried using HTML5 Canvas, but it doesnt works. Can any one suggest on what will be the best approach to achieve this?
<div id="block_container">
<div id="container"></div> <!-- which will rendered with highchart -->
<div id="datatableContent" style="display:none">
<table border='1'>
<tr><td>month</td><td>values</td></tr>
<tr><td>Jan</td><td>Assinged Time</td></tr>
<tr><td>Feb</td><td>Applied Time</td></tr>
</table>
</div>
</div>
and in Script
$('#print1').click(function() {
$('#block_container').printElement();
});