xlsgen 4.9 introduces charts using the SVG file format. It is now possible to export one or more charts as SVG, or Scalable Vector Graphics. This W3C norm is now very popular on the web thanks to the nature of SVG, i.e. vector-based drawing along with its effectiveness when specifying complex combinations (clipping, gradients, ...). It is also more efficient in size.
Here is a sample chart in PNG,
PNG chartand then the same in SVG,
SVG chartTo get this, just write :
currentWorksheet.Charts.Item(2).ExtractAsSVG("c:\\tmp\\export.svg");
Of course, all chart types and their formatting details can be exported as SVG, including the new charts we are introducing in xlsgen 4.9
When SVG charts are part of an HTML page, the beauty of it is that instead of having to worry about retrieving secondary parts (images are binary elements that are loaded after the HTML page itself is loaded), SVG charts can now be part of the HTML page itself, right within the HTML markup, and so it's much simpler to handle if you are serving HTML pages on your server.
By default, HTML export in xlsgen uses bitmap charts (PNG files), but all it takes is the following line of code to replace PNG charts with SVG charts during HTML export :
workbook.ChartEngine = enumChartEngine.chartengine_svg;