Reference > Methods > RenderSvg Method

SharpPlot.RenderSvg Method

Return completed chart rendered through SVG engine.

Example

string mysvg = sp.RenderSvg(SvgMode.FixedAspect);

Return Value

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”. It requires the free SVG plugin from Adobe for display in IE, but will display native in Firefox.

Overloads

Working with SVG

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">

See also ...

SharpPlot Members | SaveSvg Method


Send comments on this topic
© Dyalog Ltd 2014