Assume default value of 1 when no piechart threshold is set

This commit is contained in:
skyanth
2019-04-10 13:01:18 +02:00
parent a48bec4bd9
commit 20da82d7e4
2 changed files with 7 additions and 2 deletions

View File

@@ -190,7 +190,7 @@
<xs:attribute ref="pieElem" use="required"/>
<xs:attribute ref="pieHeight" use="required"/>
<xs:attribute ref="status" use="optional"/>
<xs:attribute ref="threshold" use="required"/>
<xs:attribute ref="threshold" use="optional" default="1"/>
</xs:complexType>
</xs:element>

View File

@@ -12,7 +12,12 @@
<xsl:with-param name="pieElem" select="@pieElem"/>
<xsl:with-param name="pieHeight" select="@pieHeight"/>
<xsl:with-param name="status" select="@status"/>
<xsl:with-param name="threshold" select="@threshold"/>
<xsl:with-param name="threshold">
<xsl:choose>
<xsl:when test="@threshold"><xsl:value-of select="@threshold"/></xsl:when>
<xsl:otherwise>1</xsl:otherwise>
</xsl:choose>
</xsl:with-param>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>