Browse Source

Erste Impl. Datenbalken #3

userinfo_gueltigkeit
Daniel Quathamer 1 year ago
parent
commit
ae55876f97
  1. BIN
      superx/WEB-INF/lib/superx5.0.jar
  2. 45
      superx/style/chartelements.css
  3. 2
      superx/style/superx.css
  4. 157
      superx/xml/graphtools.xsl
  5. 5
      superx/xml/maske_html.css
  6. 22
      superx/xml/pageComponents_html.xsl
  7. 9
      superx/xml/resultset_html.xsl

BIN
superx/WEB-INF/lib/superx5.0.jar

Binary file not shown.

45
superx/style/chartelements.css

@ -0,0 +1,45 @@
.chartBar
{
fill:steelblue;
stroke:gray;
}
.chartBar:hover
{
fill:red;
stroke:gray;
}
.chartLabel
{
fill:white;
stroke:yellow;
}
.chartBarSeries1
{
fill:#1D345E;
stroke:gray;
}
.chartLabelSeries1
{
fill:white;
stroke:black;
}
.chartBarSeries1:hover
{
fill:red;
stroke:gray;
}
.chartBarSeries2
{
fill:#27408B;
stroke:gray;
}
.chartBarSeries2:hover
{
fill:red;
stroke:gray;
}

2
superx/style/superx.css

@ -617,5 +617,3 @@ thead {
top: 68px; top: 68px;
} }

157
superx/xml/graphtools.xsl

@ -0,0 +1,157 @@
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template name="graph">
<xsl:param name="graphwidth" select="100" />
<xsl:param name="graphheight" select="20" />
<xsl:param name="feldname" />
<xsl:param name="feldwert" />
<xsl:variable name="gesamt">
<xsl:choose>
<xsl:when test="contains($feldwert,'|')">
<xsl:value-of select="number(substring-after($feldwert,'|'))"/>
</xsl:when>
<xsl:otherwise>100</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name="feldwertOhneGesamt">
<xsl:choose>
<xsl:when test="contains($feldwert,'|')">
<xsl:value-of select="substring-before($feldwert,'|')"/>
</xsl:when>
<xsl:otherwise><xsl:value-of select="$feldwert"/></xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:if test="string-length($feldwert) &gt; 0">
<svg width="{$graphwidth}" height="{$graphheight}"><g>
<rect x="0" y="0" width="{$graphwidth}" height="{$graphheight}" fill="#cccccc">
<title><xsl:value-of select="$gesamt"/></title></rect>
<xsl:choose>
<xsl:when test="starts-with($feldname,'_graphbarright')">
<xsl:call-template name="drawBar">
<xsl:with-param name="maxwidth" select="$graphwidth" />
<xsl:with-param name="barHeight" select="$graphheight" />
<xsl:with-param name="barClass" select="'chartBar'" />
<xsl:with-param name="barValue" select="number($feldwertOhneGesamt)" />
<xsl:with-param name="barMaxValue" select="$gesamt" />
<xsl:with-param name="barLabel" select="number($feldwertOhneGesamt)" />
<xsl:with-param name="barLabelClass" select="'chartLabel'" />
<xsl:with-param name="x" select="($graphwidth - ($graphwidth * (number($feldwertOhneGesamt) div $gesamt)))" />
<xsl:with-param name="y" select="0" />
</xsl:call-template>
</xsl:when>
<xsl:when test="starts-with($feldname,'_graphbarxseries')">
<xsl:variable name="feldwertPlusDelim">
<xsl:value-of select="concat($feldwertOhneGesamt,',')"/>
</xsl:variable>
<xsl:call-template name="chartBarXSeries">
<xsl:with-param name="graphwidth" select="$graphwidth" />
<xsl:with-param name="barHeight" select="$graphheight" />
<xsl:with-param name="ordnr" select="1" />
<xsl:with-param name="offset" select="0" />
<xsl:with-param name="feldwertSubString" select="$feldwertPlusDelim"/>
<xsl:with-param name="gesamt" select="$gesamt"/>
</xsl:call-template>
</xsl:when>
<xsl:when test="starts-with($feldname,'_graphbarwithlabel')" >
<xsl:call-template name="drawBar">
<xsl:with-param name="maxwidth" select="$graphwidth" />
<xsl:with-param name="barHeight" select="19" />
<xsl:with-param name="barClass" select="'chartBar'" />
<xsl:with-param name="barValue" select="number($feldwertOhneGesamt)" />
<xsl:with-param name="barMaxValue" select="$gesamt" />
<xsl:with-param name="barLabel" select="number($feldwertOhneGesamt)" />
<xsl:with-param name="barLabelClass" select="'chartLabel'" />
<xsl:with-param name="showLabel" select="'true'" />
</xsl:call-template>
</xsl:when>
<xsl:otherwise><!-- default: Balken linksbündig-->
<xsl:call-template name="drawBar">
<xsl:with-param name="maxwidth" select="$graphwidth" />
<xsl:with-param name="barHeight" select="19" />
<xsl:with-param name="barClass" select="'chartBar'" />
<xsl:with-param name="barValue" select="number($feldwertOhneGesamt)" />
<xsl:with-param name="barMaxValue" select="$gesamt" />
<xsl:with-param name="barLabel" select="number($feldwertOhneGesamt)" />
<xsl:with-param name="barLabelClass" select="'chartLabel'" />
</xsl:call-template>
</xsl:otherwise>
</xsl:choose>
</g>
</svg>
</xsl:if>
</xsl:template>
<xsl:template name="chartBarXSeries">
<xsl:param name="graphwidth" select="100" />
<xsl:param name="barHeight" select="19" />
<xsl:param name="ordnr" select="1" />
<xsl:param name="offset" select="0" />
<xsl:param name="feldwertSubString" />
<xsl:param name="gesamt" select="100"/>
<xsl:variable name="feldwertNumeric">
<xsl:value-of select="number(substring-before($feldwertSubString,','))"/>
</xsl:variable>
<xsl:call-template name="drawBar">
<xsl:with-param name="maxwidth" select="$graphwidth" />
<xsl:with-param name="barHeight" select="$barHeight" />
<xsl:with-param name="barClass" select="concat('chartBarSeries',$ordnr)" />
<xsl:with-param name="barValue" select="$feldwertNumeric" />
<xsl:with-param name="barMaxValue" select="$gesamt" />
<xsl:with-param name="barLabel" select="$feldwertNumeric" />
<xsl:with-param name="barLabelClass" select="concat('chartLabelSeries',$ordnr)" />
<xsl:with-param name="x" select="$offset" />
<xsl:with-param name="y" select="0" />
</xsl:call-template>
<xsl:if test="contains(substring-after($feldwertSubString,','),',')">
<xsl:call-template name="chartBarXSeries">
<xsl:with-param name="graphwidth" select="$graphwidth" />
<xsl:with-param name="barHeight" select="$barHeight" />
<xsl:with-param name="ordnr" select="$ordnr + 1" />
<xsl:with-param name="offset" select="$offset + ($graphwidth * ($feldwertNumeric div $gesamt))" />
<xsl:with-param name="feldwertSubString" select="substring-after($feldwertSubString,',')"/>
</xsl:call-template>
</xsl:if>
</xsl:template>
<xsl:template name="drawBar">
<xsl:param name="maxwidth" select="100" />
<xsl:param name="barHeight" select="19" />
<xsl:param name="barClass" select="'chartBar'" />
<xsl:param name="barValue" />
<xsl:param name="barMaxValue" />
<xsl:param name="barLabel" />
<xsl:param name="barLabelClass" select="'chartLabel'" />
<xsl:param name="x" select="0" />
<xsl:param name="y" select="0" />
<xsl:param name="showLabel" select="'false'" />
<xsl:variable name="barWidth">
<xsl:value-of select="$maxwidth * ($barValue div $barMaxValue)"/>
</xsl:variable>
<rect class="{$barClass}"
width="{$barWidth}" height="{$barHeight}"
x="{$x}" y="{$y}"
rx="5" ry="5">
<title><xsl:value-of select="format-number($barLabel,'###.###.###.###.##0,00','German')"/></title></rect>
<xsl:if test="$showLabel='true' and $barWidth &gt; 5 and $barLabel !=''">
<text x="{$x + ($barWidth div 2)}" y="{$barHeight div 2}" class="{$barLabelClass}"
dominant-baseline="middle" text-anchor="middle">
<xsl:value-of select="format-number($barLabel,'###.###.###.###.##0','German')"/></text>
</xsl:if>
</xsl:template>
</xsl:stylesheet>

5
superx/xml/maske_html.css

@ -1,3 +1,5 @@
/* import der Styles für Grafiken */
@import "../style/chartelements.css";
p.nachricht p.nachricht
{border:medium solid red; {border:medium solid red;
@ -866,3 +868,6 @@ body .dojoTooltip { border: solid 1px #cccccc; padding: 4px; color:#186090;}
.sichtstand{ .sichtstand{
font-size:80% !important;; font-size:80% !important;;
} }

22
superx/xml/pageComponents_html.xsl

@ -835,8 +835,26 @@ document.forms[0].target = '_blank';
</td> </td>
<td> <td>
<span dojoType="tooltip" connectId="btnHelp" style="display:none">Benutzerhandbuch</span> <span dojoType="tooltip" connectId="btnHelp" style="display:none">Benutzerhandbuch</span>
<a href="../doku/kern_modul/benutzer/main.htm" target="_blank" title="Benutzerhandbuch" > <xsl:variable name="doku_url">
<img src="../images/book.svg" class="svg_icon" border="0" alt="Benutzerhandbuch"/></a></td> <xsl:choose>
<xsl:when test="contains(/ergebnisse/ergebnis/maskenname/@helpcontext,'@@')">
<xsl:text>http://www.superx-projekt.de/doku/kern_modul/benutzer/</xsl:text>
</xsl:when>
<xsl:when test="starts-with(/ergebnisse/ergebnis/maskenname/@helpcontext,'http')">
<xsl:value-of select="/ergebnisse/ergebnis/maskenname/@helpcontext"/>
</xsl:when>
<xsl:otherwise>
<xsl:text>/</xsl:text><xsl:value-of select="/ergebnisse/ergebnis/maskenname/@helpcontext"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<a href="{$doku_url}" title="Hilfe"
target="_blank" class="linkLookImage">
<img title="Handbuch" alt="Handbuch" src="../images/book.svg" class="svg_icon"
border="0" />
</a>
</td>
<td> <td>
<span dojoType="tooltip" connectId="btnInfo" style="display:none">Versionsinformation</span> <span dojoType="tooltip" connectId="btnInfo" style="display:none">Versionsinformation</span>
<a href="javascript:alert('SuperX Version 4.6 \n www.superx-projekt.de');" id="btnInfo"> <a href="javascript:alert('SuperX Version 4.6 \n www.superx-projekt.de');" id="btnInfo">

9
superx/xml/resultset_html.xsl

@ -3,6 +3,7 @@
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:import href="interLinks_html.xsl" /> <xsl:import href="interLinks_html.xsl" />
<xsl:import href="xsl_functions.xsl" /> <xsl:import href="xsl_functions.xsl" />
<xsl:import href="graphtools.xsl" />
<xsl:template name="legende"> <xsl:template name="legende">
<xsl:comment>Template legende in file resultset_html.xsl</xsl:comment> <xsl:comment>Template legende in file resultset_html.xsl</xsl:comment>
<xsl:choose> <xsl:choose>
@ -740,7 +741,13 @@ neu.document.close();
<xsl:choose> <xsl:choose>
<xsl:when test="starts-with(f_name,'_graph')"> <!-- Balkendiagramm --> <xsl:when test="starts-with(f_name,'_graph')"> <!-- Balkendiagramm -->
<img src="../images/blue_bar.jpg" height="10px" border="0px" width="{concat(wert,'px')}"/> <xsl:variable name="feldname"><xsl:value-of select="f_name"/></xsl:variable>
<xsl:call-template name="graph">
<xsl:with-param name="graphwidth" select="../../headers/header[f_name=$feldname]/@width * 12" />
<xsl:with-param name="graphheight" select="20" />
<xsl:with-param name="feldname" select="f_name" />
<xsl:with-param name="feldwert" select="wert" />
</xsl:call-template>
</xsl:when> </xsl:when>
<xsl:when test="@typ='3'"> <!-- DecimalFormat --> <xsl:when test="@typ='3'"> <!-- DecimalFormat -->

Loading…
Cancel
Save