Add a rendering parameter to ag_chart_create_svg()
Based upon this parameter a <rect> is included in the resulting SVG document, providing a background color, and so is the chart CSS.
This commit is contained in:
@@ -134,3 +134,7 @@ line.antiscion {
|
||||
stroke: #000000;
|
||||
stroke-dasharray: 20,10;
|
||||
}
|
||||
|
||||
#background {
|
||||
fill: #ffffff;
|
||||
}
|
||||
|
@@ -69,6 +69,15 @@
|
||||
version="1.0">
|
||||
<xsl:attribute name="width"><xsl:value-of select="$image_size"/></xsl:attribute>
|
||||
<xsl:attribute name="height"><xsl:value-of select="$image_size"/></xsl:attribute>
|
||||
|
||||
<xsl:choose>
|
||||
<xsl:when test="$rendering='yes'">
|
||||
<style type="text/css">
|
||||
<xi:include href="gres://ui/chart-default.css" parse="text"/>
|
||||
</style>
|
||||
</xsl:when>
|
||||
</xsl:choose>
|
||||
|
||||
<title>
|
||||
<xsl:value-of select="concat(
|
||||
'Natal chart of ',
|
||||
@@ -116,6 +125,16 @@
|
||||
<polygon points="0.0,0.0 7.0,-2.0 5.0,0.0 7.0,2.0" />
|
||||
</marker>
|
||||
</defs>
|
||||
|
||||
<xsl:choose>
|
||||
<xsl:when test="$rendering='yes'">
|
||||
<rect id="background" x="0" y="0">
|
||||
<xsl:attribute name="width"><xsl:value-of select="$image_size"/></xsl:attribute>
|
||||
<xsl:attribute name="height"><xsl:value-of select="$image_size"/></xsl:attribute>
|
||||
</rect>
|
||||
</xsl:when>
|
||||
</xsl:choose>
|
||||
|
||||
<g id="chart">
|
||||
<xsl:attribute name="transform"><xsl:value-of select="concat('translate(', $image_size div 2, ',', $image_size div 2, ')')" /></xsl:attribute>
|
||||
<g id="moonless_chart">
|
||||
|
Reference in New Issue
Block a user