Class ChartSvg
java.lang.Object
com.independentsoft.office.charts.ChartSvg
Port of the C# ChartSvg renderer (ChartSvg.cs). Renders a chart part as inline SVG. Only
the values cached inside the chart are used (numCache/strCache); formulas are never
recalculated, so a chart whose caches were stripped renders nothing and the caller falls
back to a placeholder.
C# declares the class internal; Java has no assembly scope, so it is public here for the
same reason Util is. Method names follow the C#
original to keep the port faithful.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Stringrender(ChartSpace chartSpace, Theme theme, double width, double height)Renders a chart as an SVG element.static StringresolveColorChoice(ColorChoice choice, Theme theme)Resolves a DrawingML color reference (literal, scheme, system or preset) plus its transforms into a CSS color.
-
Constructor Details
-
ChartSvg
public ChartSvg()
-
-
Method Details
-
render
Renders a chart as an SVG element.- Parameters:
chartSpace- the chart to render.theme- the document theme, used to resolve scheme colours. May be null.width- the width in pixels.height- the height in pixels.- Returns:
- the SVG markup, or null when the chart holds no cached data.
-
resolveColorChoice
Resolves a DrawingML color reference (literal, scheme, system or preset) plus its transforms into a CSS color.- Parameters:
choice- the color reference.theme- the document theme. May be null.- Returns:
- the CSS color, or null when the reference cannot be resolved.
-