|
|
|
<?xml version="1.0" encoding="UTF-8" ?>
|
|
|
|
<xsl:stylesheet version="1.0"
|
|
|
|
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
|
|
|
<xsl:template name="bil_grafik">
|
|
|
|
<xsl:param name="erglevelmax" />
|
|
|
|
<xsl:param name="row" />
|
|
|
|
<xsl:param name="grafiktyp"/>
|
|
|
|
|
|
|
|
<!-- disable-output-escaping="yes" sorgt dafür, dass z.B. das Zeichen '<' nicht in '<' umgewandelt wird -->
|
|
|
|
<xsl:text disable-output-escaping="yes"><![CDATA[ <script type="text/javascript">]]></xsl:text>
|
|
|
|
|
|
|
|
<!-- einfaches Säulendiagramm -->
|
|
|
|
<xsl:if test="$grafiktyp='saeulendiagramm'">
|
|
|
|
<!-- Javascript-Funktion zum Erzeugen einer Säulendiagramm -->
|
|
|
|
|
|
|
|
function DrawBarGraph(data, div_id, ticks, labels, label, minimal, maximal)
|
|
|
|
{
|
|
|
|
var labels= labels;
|
|
|
|
|
|
|
|
$.jqplot(div_id, data,{stackSeries: true,
|
|
|
|
seriesColors:[ '#92B4DC','#CCCCCC', '#7297BC'],
|
|
|
|
seriesDefaults:{
|
|
|
|
renderer:$.jqplot.BarRenderer,
|
|
|
|
pointLabels: { show: true }
|
|
|
|
},
|
|
|
|
legend: {show: true,
|
|
|
|
placement: 'outside',
|
|
|
|
labels: labels},
|
|
|
|
axes: {
|
|
|
|
xaxis: {
|
|
|
|
renderer: $.jqplot.CategoryAxisRenderer,
|
|
|
|
label: label,
|
|
|
|
ticks: ticks,
|
|
|
|
labelRenderer: $.jqplot.CanvasAxisLabelRenderer,
|
|
|
|
tickRenderer: $.jqplot.CanvasAxisTickRenderer,
|
|
|
|
tickOptions: { angle: 75 }
|
|
|
|
},
|
|
|
|
yaxis: {
|
|
|
|
min: minimal,
|
|
|
|
max: maximal,
|
|
|
|
label: 'Anzahl',
|
|
|
|
// Formatierung der Werte
|
|
|
|
tickOptions:{formatString:'%.0f'}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
<xsl:text>DrawBarGraph([data], 'bar1', ticks, labels, label, 0, max); </xsl:text>
|
|
|
|
</xsl:if>
|
|
|
|
|
|
|
|
<!-- Säulendiagramm mit Stapeln -->
|
|
|
|
<xsl:if test="$grafiktyp='saeulendiagramm_gestapelt'">
|
|
|
|
<!-- Funktion für das Erzeugen eines Säulendiagramms mit Stapeln -->
|
|
|
|
|
|
|
|
function DrawBarGraph2(data, div_id, ticks, legende, farben, EinheitXAchse, EinheitYAchse)
|
|
|
|
{
|
|
|
|
$.jqplot(div_id, data,{stackSeries: true,
|
|
|
|
seriesColors:farben,
|
|
|
|
seriesDefaults:{
|
|
|
|
renderer:$.jqplot.BarRenderer,
|
|
|
|
pointLabels: { show: true,
|
|
|
|
hideZeros: true}
|
|
|
|
|
|
|
|
},
|
|
|
|
series:legende,
|
|
|
|
legend: {show: true,
|
|
|
|
placement: 'outside'},
|
|
|
|
axes: {
|
|
|
|
xaxis: {
|
|
|
|
renderer: $.jqplot.CategoryAxisRenderer,
|
|
|
|
label: EinheitXAchse,
|
|
|
|
ticks: ticks,
|
|
|
|
labelRenderer: $.jqplot.CanvasAxisLabelRenderer,
|
|
|
|
tickRenderer: $.jqplot.CanvasAxisTickRenderer,
|
|
|
|
tickOptions: { angle: 90 }
|
|
|
|
},
|
|
|
|
yaxis: {
|
|
|
|
label: EinheitYAchse,
|
|
|
|
// Formatierung der Werte
|
|
|
|
tickOptions:{formatString:'%.0f'}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
};
|
|
|
|
<xsl:text>DrawBarGraph2(data, 'bar1', ticks, legende, farben, EinheitXAchse, EinheitYAchse); </xsl:text>
|
|
|
|
</xsl:if>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<xsl:text disable-output-escaping="yes"><![CDATA[</script>]]> </xsl:text>
|
|
|
|
|
|
|
|
|
|
|
|
</xsl:template>
|
|
|
|
|
|
|
|
|
|
|
|
</xsl:stylesheet>
|
|
|
|
|
|
|
|
|