Daniel Quathamer
2 years ago
9 changed files with 469 additions and 36 deletions
@ -1,2 +1,3 @@ |
|||||||
1^d3js^D3JS (V7)^ |
1^d3js^D3JS (V7)^ |
||||||
2^plot^Observable Plot^ |
2^plot^Observable Plot^ |
||||||
|
3^basic^Basic Shapes^ |
||||||
|
@ -0,0 +1,184 @@ |
|||||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||||
|
<xsl:stylesheet version="1.0" |
||||||
|
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:HtmlUtils="de.superx.util.HtmlUtils"> |
||||||
|
<xsl:import href="xsl_functions.xsl" /> |
||||||
|
<xsl:import href="resultset_html.xsl" /> |
||||||
|
<xsl:import href="interLinks_html.xsl" /> |
||||||
|
<xsl:import href="pageComponents_html.xsl" /> |
||||||
|
<xsl:import href="pageComponents_html_final.xsl" /> |
||||||
|
<xsl:import href="viz_html_chart.xsl" /> |
||||||
|
<xsl:import href="menue_html_dojo.xsl" /> |
||||||
|
<!--In diesem Stylesheet können Sie individuelle templates unterbringen, |
||||||
|
die in ihrer Präzedenz das normale Stylesheet |
||||||
|
pageComponents_html.xsl überragt. --> |
||||||
|
<xsl:import href="pageComponents_html_final.xsl" /> |
||||||
|
|
||||||
|
<xsl:decimal-format name="German" grouping-separator="." NaN="" zero-digit ="0" decimal-separator="," /> |
||||||
|
|
||||||
|
<!-- wichtig für DOJO!--> |
||||||
|
<xsl:output method="xml" media-type="text/html" doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" |
||||||
|
doctype-system="DTD/xhtml1-strict.dtd" cdata-section-elements="script style" indent="yes" encoding="UTF-8"/> |
||||||
|
<xsl:variable name="defaultRenderer" select="'d3js'" /> |
||||||
|
<xsl:variable name="availableRendererPlot" select="'false'" /> |
||||||
|
<xsl:variable name="availableRendererD3" select="'true'" /> |
||||||
|
|
||||||
|
<xsl:template match="/"> |
||||||
|
<xsl:call-template name="table"/> |
||||||
|
</xsl:template> |
||||||
|
<!-- start table main--> |
||||||
|
<xsl:template name="table"> |
||||||
|
<html> |
||||||
|
<xsl:choose> |
||||||
|
<xsl:when test="/ergebnisse/@hisinone_active='true'"> |
||||||
|
<xsl:call-template name="head_hisinone" ><xsl:with-param name="title" select="concat('Ergebnis ',/ergebnisse/ergebnis[ position()=1]/maskenname)" /></xsl:call-template> |
||||||
|
</xsl:when> |
||||||
|
<xsl:otherwise> |
||||||
|
<xsl:call-template name="head_superx_viz" ><xsl:with-param name="title" select="concat('Ergebnis ',/ergebnisse/ergebnis[ position()=1]/maskenname)" /></xsl:call-template> |
||||||
|
</xsl:otherwise> |
||||||
|
</xsl:choose> |
||||||
|
|
||||||
|
<xsl:call-template name="tableJavascript_viz"></xsl:call-template> |
||||||
|
|
||||||
|
<!-- start Body--> |
||||||
|
<body onload="document.getElementById('progressbar').style.display='none';initPage();"> <!-- tableonload definiert in pageComponents.pccustomize position table_post_javascript --> |
||||||
|
<div id="progressbar" style="position:absolute; width:150px; height:150px; left:200px; top:200px; background:#AAAAAA"> |
||||||
|
<p> <b>Laden...</b><br/><img src="../images/progress_bar.gif"></img><br/></p></div> |
||||||
|
|
||||||
|
<xsl:if test="/ergebnisse/@showNavigation='true'"> |
||||||
|
<xsl:for-each select="/ergebnisse/menue"> |
||||||
|
<xsl:call-template name="menuFrame" /> |
||||||
|
</xsl:for-each> |
||||||
|
</xsl:if> |
||||||
|
<div> |
||||||
|
<xsl:if test="/ergebnisse/@showNavigation='true'"> |
||||||
|
<xsl:attribute name="class"><xsl:text>page-wrap</xsl:text></xsl:attribute> |
||||||
|
<xsl:for-each select="/ergebnisse/menue"> |
||||||
|
<xsl:call-template name="topbar_menue" /> |
||||||
|
</xsl:for-each> |
||||||
|
</xsl:if> |
||||||
|
|
||||||
|
<div> |
||||||
|
<xsl:if test="/ergebnisse/@showNavigation='true'"> |
||||||
|
<xsl:attribute name="id"><xsl:text>wrapper</xsl:text></xsl:attribute> |
||||||
|
</xsl:if> |
||||||
|
<xsl:call-template name="viz_canvas"/> |
||||||
|
<xsl:call-template name="bottombar" /> |
||||||
|
<xsl:comment>customfooter</xsl:comment> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
<xsl:call-template name="footer" /> |
||||||
|
</body> |
||||||
|
<!-- end body --> |
||||||
|
</html> |
||||||
|
</xsl:template> |
||||||
|
<!-- end main --> |
||||||
|
<xsl:template name="importVizJavascriptLibs"> |
||||||
|
<script language="Javascript" type="text/javascript" src="../xml/js/viz/d3.min.js" /> |
||||||
|
<script language="Javascript" type="text/javascript" src="../xml/js/viz/plot.js" /> |
||||||
|
<script language="Javascript" type="text/javascript" src="../xml/js/viz/viz_functions.js" /> |
||||||
|
<script language="Javascript" type="module" src="../xml/js/viz/d3-sankey.js" /> |
||||||
|
<script language="Javascript" type="text/javascript"> |
||||||
|
<xsl:variable name="quote"><xsl:text>"</xsl:text></xsl:variable> |
||||||
|
<xsl:text><![CDATA[ |
||||||
|
|
||||||
|
function initPage() |
||||||
|
{ |
||||||
|
var myChartModelStr=""; |
||||||
|
var myDiv=""; |
||||||
|
]]></xsl:text> |
||||||
|
<xsl:for-each select="ergebnisse"> |
||||||
|
<xsl:for-each select="ergebnis/ergebniselement"> |
||||||
|
<xsl:variable name="chart_id"><xsl:value-of select="../felder/feld[@varname='Grafik']/value" /></xsl:variable> |
||||||
|
<xsl:variable name="ergebniselement_ordnr"><xsl:value-of select="@ordnr" /></xsl:variable> |
||||||
|
<xsl:if test="$chart_id != ''"> |
||||||
|
<xsl:text><![CDATA[ |
||||||
|
myChartModelStr=']]></xsl:text> |
||||||
|
<xsl:value-of select="translate(viz_charts/viz_chart[@tid=$chart_id]/@chartmodel,'§',$quote)" /> |
||||||
|
<xsl:text><![CDATA['; |
||||||
|
myDiv="]]></xsl:text> |
||||||
|
<xsl:value-of select="concat('chartDiv',$ergebniselement_ordnr)" /> |
||||||
|
<xsl:text><![CDATA["; |
||||||
|
createViewer(myChartModelStr,myDiv); |
||||||
|
]]></xsl:text> |
||||||
|
</xsl:if> |
||||||
|
</xsl:for-each> |
||||||
|
</xsl:for-each> |
||||||
|
<xsl:text><![CDATA[ |
||||||
|
} |
||||||
|
|
||||||
|
function createViewer(myChartModelStr,chartDiv) |
||||||
|
{ |
||||||
|
myChartModel=JSON.parse(myChartModelStr); |
||||||
|
renderChart(chartDiv,myChartModel); |
||||||
|
} |
||||||
|
|
||||||
|
function toggleLegendeDisplay(legendeDiv) |
||||||
|
{ |
||||||
|
var myDiv=document.getElementById(legendeDiv); |
||||||
|
if(myDiv.style.display=="block") |
||||||
|
myDiv.style.display="none"; |
||||||
|
else |
||||||
|
myDiv.style.display="block"; |
||||||
|
|
||||||
|
} |
||||||
|
]]></xsl:text> |
||||||
|
</script> |
||||||
|
|
||||||
|
</xsl:template> |
||||||
|
|
||||||
|
<xsl:template name="viz_canvas"> |
||||||
|
<xsl:if test="/ergebnisse/@isMakro='true'"> |
||||||
|
<h1><xsl:value-of select="/ergebnisse/makro/name" /></h1> |
||||||
|
</xsl:if> |
||||||
|
<p></p> |
||||||
|
<xsl:call-template name="buildVizMetadata" /> |
||||||
|
|
||||||
|
<!-- end Kopf--> |
||||||
|
<!-- start Grafiken--> |
||||||
|
<!-- Berechne den Umbruch der Spalten für die Kacheln |
||||||
|
z.B. 6 Grafiken ergibt einen Umbruch nach der 3. Teiltabelle |
||||||
|
Formel: ANZ / 2 kaufm. gerundet |
||||||
|
--> |
||||||
|
<xsl:variable name="ergebniselemente_anz"> |
||||||
|
<xsl:value-of select="count(/ergebnisse/ergebnis[felder/feld[@varname='Grafik']])"/> |
||||||
|
</xsl:variable> |
||||||
|
<xsl:variable name="ergebniselemente_umbruch"> |
||||||
|
<xsl:value-of select="round($ergebniselemente_anz div max(number(/ergebnisse/ergebnis/felder/feld[@varname='Spaltenanzahl']/value)))"/> |
||||||
|
</xsl:variable> |
||||||
|
<!--<p>plan: <xsl:value-of select="concat($ergebniselemente_anz,'-',/ergebnisse/ergebnis/felder/feld[@varname='Spaltenanzahl']/value,' Umbruch: ',$ergebniselemente_umbruch)"/> |
||||||
|
</p>--> |
||||||
|
<span class="separator"> </span> |
||||||
|
<!--Beginn Selektions-Card--> |
||||||
|
<!--Beginn Berichtstitel, Pfad, Knopfleiste--> |
||||||
|
<section class="hero-body has-background-light"> |
||||||
|
<div class="columns is-mobile is-left"> |
||||||
|
<xsl:text disable-output-escaping="true"><![CDATA[ |
||||||
|
<div class="column"> |
||||||
|
]]></xsl:text> |
||||||
|
|
||||||
|
|
||||||
|
<xsl:for-each select="ergebnisse/ergebnis[felder/feld[@varname='Grafik']/value!='']/ergebniselement"> |
||||||
|
<xsl:variable name="ergebniselement_counter" select="position()" /> |
||||||
|
<xsl:variable name="chart_id"><xsl:value-of select="../felder/feld[@varname='Grafik']/value" /></xsl:variable> |
||||||
|
<xsl:variable name="ergebniselement_ordnr"><xsl:value-of select="@ordnr" /></xsl:variable> |
||||||
|
|
||||||
|
|
||||||
|
<!--<p><xsl:value-of select="concat('Zähler: ',$ergebniselement_counter)"/></p>--> |
||||||
|
<xsl:call-template name="viewer_kachel"> |
||||||
|
<xsl:with-param name="caption" select="viz_charts/viz_chart[@tid=$chart_id]/@caption"/> |
||||||
|
<xsl:with-param name="ergebniselement_ordnr" select="$ergebniselement_ordnr" /> |
||||||
|
</xsl:call-template> |
||||||
|
|
||||||
|
<!-- neue Spalte wenn counter=umbruch --> |
||||||
|
|
||||||
|
<xsl:if test="$ergebniselement_counter = $ergebniselemente_umbruch "> |
||||||
|
<xsl:text disable-output-escaping="true"><![CDATA[</div> |
||||||
|
<div class="column"> |
||||||
|
]]></xsl:text> |
||||||
|
</xsl:if> |
||||||
|
</xsl:for-each> |
||||||
|
<xsl:text disable-output-escaping="true"><![CDATA[</div>]]></xsl:text> <!-- der letzten column --> |
||||||
|
</div><!-- der columns --> |
||||||
|
</section> |
||||||
|
</xsl:template> |
||||||
|
</xsl:stylesheet> |
Loading…
Reference in new issue