SharpLeaf Reference > SharpLeaf Methods > RenderSvg Method

SharpLeaf.RenderSvg Method

Return report rendered as SVG.

Overloads

Result

The result of this call is a string representation of an SVG document. This may be written to file as text for inclusion in a webpage, or returned via HTTP with content type “image/svg+xml”.

Most modern browsers (including Microsoft Internet Explorer 9 – 2011) natively support SVG. So not only they will display SVG files save with SaveSvg, but you can also inline the string returned by RenderSvg directly into you HTML body.

For compatibility with older browsers, you can embed the SVG using the <embed> tag :

<embed src="mychart.svg" height=300 width=640 type="image/svg+xml">

Example

  // Render SVG that fits to container's width
   svg = lf.RenderSvg(SvgMode.FitWidth);

See also ...

SharpLeaf Members | SharpLeaf.SaveSvg Method


Send comments on this topic
© Dyalog Ltd 2016