|
|
@ -1,6 +1,7 @@ |
|
|
|
<?xml version="1.0" encoding="UTF-8" ?> |
|
|
|
<?xml version="1.0" encoding="UTF-8" ?> |
|
|
|
<xsl:stylesheet version="1.0" |
|
|
|
<xsl:stylesheet version="1.0" |
|
|
|
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> |
|
|
|
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" |
|
|
|
|
|
|
|
xmlns:svg="http://www.w3.org/2000/svg"> |
|
|
|
<xsl:template name="graph"> |
|
|
|
<xsl:template name="graph"> |
|
|
|
<xsl:param name="graphwidth" select="100" /> |
|
|
|
<xsl:param name="graphwidth" select="100" /> |
|
|
|
<xsl:param name="graphheight" select="20" /> |
|
|
|
<xsl:param name="graphheight" select="20" /> |
|
|
@ -23,10 +24,14 @@ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> |
|
|
|
<xsl:otherwise><xsl:value-of select="$feldwert"/></xsl:otherwise> |
|
|
|
<xsl:otherwise><xsl:value-of select="$feldwert"/></xsl:otherwise> |
|
|
|
</xsl:choose> |
|
|
|
</xsl:choose> |
|
|
|
</xsl:variable> |
|
|
|
</xsl:variable> |
|
|
|
|
|
|
|
<xsl:variable name="barColorBg"> |
|
|
|
|
|
|
|
<xsl:call-template name="myBarColorBg" /> |
|
|
|
|
|
|
|
</xsl:variable> |
|
|
|
|
|
|
|
|
|
|
|
<xsl:if test="string-length($feldwert) > 0"> |
|
|
|
<xsl:if test="string-length($feldwert) > 0"> |
|
|
|
<svg width="{$graphwidth}" height="{$graphheight}"><g> |
|
|
|
<svg:svg width="{concat($graphwidth,'px')}" height="{concat($graphheight,'px')}"><svg:g> |
|
|
|
<rect x="0" y="0" width="{$graphwidth}" height="{$graphheight}" fill="#cccccc"> |
|
|
|
<svg:rect x="0" y="0" width="{concat($graphwidth,'px')}" height="{concat($graphheight,'px')}" fill="{$barColorBg}"> |
|
|
|
<title><xsl:value-of select="$gesamt"/></title></rect> |
|
|
|
<svg:title><xsl:value-of select="$gesamt"/></svg:title></svg:rect> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<xsl:choose> |
|
|
|
<xsl:choose> |
|
|
@ -89,8 +94,8 @@ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> |
|
|
|
</xsl:otherwise> |
|
|
|
</xsl:otherwise> |
|
|
|
</xsl:choose> |
|
|
|
</xsl:choose> |
|
|
|
|
|
|
|
|
|
|
|
</g> |
|
|
|
</svg:g> |
|
|
|
</svg> |
|
|
|
</svg:svg> |
|
|
|
</xsl:if> |
|
|
|
</xsl:if> |
|
|
|
</xsl:template> |
|
|
|
</xsl:template> |
|
|
|
<xsl:template name="chartBarXSeries"> |
|
|
|
<xsl:template name="chartBarXSeries"> |
|
|
@ -143,15 +148,20 @@ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> |
|
|
|
<xsl:value-of select="$maxwidth * ($barValue div $barMaxValue)"/> |
|
|
|
<xsl:value-of select="$maxwidth * ($barValue div $barMaxValue)"/> |
|
|
|
</xsl:variable> |
|
|
|
</xsl:variable> |
|
|
|
|
|
|
|
|
|
|
|
<rect class="{$barClass}" |
|
|
|
<xsl:variable name="barColorFg"> |
|
|
|
|
|
|
|
<xsl:call-template name="myBarColorFg" /> |
|
|
|
|
|
|
|
</xsl:variable> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<svg:rect class="{$barClass}" |
|
|
|
width="{$barWidth}" height="{$barHeight}" |
|
|
|
width="{$barWidth}" height="{$barHeight}" |
|
|
|
x="{$x}" y="{$y}" |
|
|
|
x="{$x}" y="{$y}" |
|
|
|
rx="5" ry="5"> |
|
|
|
rx="5" ry="5" fill="{$barColorFg}"> |
|
|
|
<title><xsl:value-of select="format-number($barLabel,'###.###.###.###.##0,00','German')"/></title></rect> |
|
|
|
<svg:title><xsl:value-of select="format-number($barLabel,'###.###.###.###.##0,00','German')"/></svg:title></svg:rect> |
|
|
|
<xsl:if test="$showLabel='true' and $barWidth > 5 and $barLabel !=''"> |
|
|
|
<xsl:if test="$showLabel='true' and $barWidth > 5 and $barLabel !=''"> |
|
|
|
<text x="{$x + ($barWidth div 2)}" y="{$barHeight div 2}" class="{$barLabelClass}" |
|
|
|
<svg:text x="{$x + ($barWidth div 2)}" y="{$barHeight div 2}" class="{$barLabelClass}" |
|
|
|
dominant-baseline="middle" text-anchor="middle"> |
|
|
|
dominant-baseline="middle" text-anchor="middle"> |
|
|
|
<xsl:value-of select="format-number($barLabel,'###.###.###.###.##0','German')"/></text> |
|
|
|
<xsl:value-of select="format-number($barLabel,'###.###.###.###.##0','German')"/></svg:text> |
|
|
|
</xsl:if> |
|
|
|
</xsl:if> |
|
|
|
</xsl:template> |
|
|
|
</xsl:template> |
|
|
|
|
|
|
|
|
|
|
|
</xsl:stylesheet> |
|
|
|
</xsl:stylesheet> |
|
|
|