SvgChartRenderer Class

Writes a ChartScene as SVG.

public static class SvgChartRenderer

Remarks

The output is deterministic: numbers use the invariant culture and SvgRenderOptions.Precision decimals, identifiers are numbered in document order, and each element is on its own line. The root element has role="img", and the title and the description of the scene become its title and desc. The SceneElement.DataAttributes of an element are written in the order of their names.

Methods

NameDescription
Render(ChartScene, SvgRenderOptions?)Returns the SVG of a scene.
Render(ChartScene, TextWriter, SvgRenderOptions?)Writes the SVG of a scene.

Render overloads

Render(ChartScene, SvgRenderOptions?)

SvgChartRenderer.cs

Returns the SVG of a scene.

public static string Render(ChartScene scene, SvgRenderOptions? options = null)
Parameters
scene ChartScene
The scene.
options SvgRenderOptions?
The options, or null for the defaults.
Returns

string The SVG document, without an XML declaration.

Render(ChartScene, TextWriter, SvgRenderOptions?)

SvgChartRenderer.cs

Writes the SVG of a scene.

public static void Render(ChartScene scene, TextWriter writer, SvgRenderOptions? options = null)
Parameters
scene ChartScene
The scene.
writer TextWriter
The destination.
options SvgRenderOptions?
The options, or null for the defaults.