Browse Source

Sortierung Dimensionen #5

makro_datasrc
Daniel Quathamer 2 years ago
parent
commit
4990366577
  1. 2
      src-modules/module/viz/conf/includes.txt
  2. 1
      src-modules/module/viz/schluesseltabellen/viz_property.unl
  3. 5
      src-modules/module/viz/schluesseltabellen/viz_type_property.unl
  4. 55
      superx/images/minus-circled.svg
  5. 55
      superx/images/plus-circled.svg
  6. 29
      superx/xml/js/viz/viz_functions.js
  7. 20
      superx/xml/viz_html_chart.xsl

2
src-modules/module/viz/conf/includes.txt

@ -2,6 +2,8 @@ doku/viz_modul/viz.html @@ -2,6 +2,8 @@ doku/viz_modul/viz.html
images/icons/more.svg
images/icons/chart-bar.svg
images/information_grey_liberation.svg
images/plus-circled.svg
images/minus-circled.svg
style/sx_viz_muster.css
style/bulma-tooltip.min.css
style/LICENSE_bulma_tooltip_1.2.0.txt

1
src-modules/module/viz/schluesseltabellen/viz_property.unl

@ -46,3 +46,4 @@ @@ -46,3 +46,4 @@
86^X: Label^label_x^^ ^1^ ^0^1^18^Label X-Achse^602^^^string^
87^Y: Label^label_y^^ ^1^ ^0^1^21^Label Y-Achse^602^^^string^
88^Punktdicke^r^^ ^1^ ^0^1^5^Punktdicke von Diagrammelementen (relevant für Plot.dot, Plot.tickX/Y)^308^^^string^
89^Sortierung^sort^^ ^1^ ^0^1^5^ ^608^^^string^

5
src-modules/module/viz/schluesseltabellen/viz_type_property.unl

@ -15,3 +15,8 @@ @@ -15,3 +15,8 @@
24^5^8^0^
26^3^76^0^
27^6^88^0^
28^3^89^0^
29^6^89^0^
30^5^89^0^
31^2^89^0^
32^1^89^0^

55
superx/images/minus-circled.svg

@ -0,0 +1,55 @@ @@ -0,0 +1,55 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="25"
version="1.1"
id="svg4"
sodipodi:docname="minus-circled.svg"
height="25"
inkscape:version="0.92.2 5c3e80d, 2017-08-06">
<metadata
id="metadata10">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs8" />
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1920"
inkscape:window-height="963"
id="namedview6"
showgrid="false"
inkscape:zoom="1.6577938"
inkscape:cx="224.82479"
inkscape:cy="50"
inkscape:window-x="1920"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="svg4" />
<path
d="m 19.793399,13.54895 v -2.0979 q 0,-0.40793 -0.320513,-0.72844 -0.320513,-0.32051 -0.728438,-0.29137 H 6.2444476 q -0.4079254,0 -0.7284382,0.29137 -0.3205128,0.29138 -0.2913753,0.72844 v 2.0979 q 0,0.40793 0.2913753,0.72844 0.2913753,0.32051 0.7284382,0.29137 H 18.744448 q 0.407925,0 0.728438,-0.29137 0.320513,-0.29138 0.320513,-0.72844 z M 24.979879,12.5 q 0,3.40909 -1.660839,6.26457 -1.660839,2.85548 -4.545455,4.54545 Q 15.88897,25 12.509016,25 9.129063,25 6.2153101,23.31002 3.3015572,21.62005 1.6989931,18.76457 0.09642897,15.90909 0.00901639,12.5 -0.07839621,9.09091 1.6989931,6.23543 3.4763823,3.37995 6.2153101,1.68998 8.9542378,0 12.509016,0 q 3.554779,0 6.264569,1.68998 2.70979,1.68997 4.545455,4.54545 1.835664,2.85548 1.660839,6.26457 z"
id="path2"
inkscape:connector-curvature="0"
style="stroke-width:0.02913753" />
</svg>

After

Width:  |  Height:  |  Size: 2.3 KiB

55
superx/images/plus-circled.svg

@ -0,0 +1,55 @@ @@ -0,0 +1,55 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="25"
version="1.1"
id="svg4"
sodipodi:docname="plus-circled.svg"
height="25"
inkscape:version="0.92.2 5c3e80d, 2017-08-06">
<metadata
id="metadata10">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs8" />
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1920"
inkscape:window-height="963"
id="namedview6"
showgrid="false"
inkscape:zoom="5.089945"
inkscape:cx="63.712855"
inkscape:cy="50"
inkscape:window-x="1920"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="svg4" />
<path
d="m 19.793398,13.548949 v -2.097898 q 0,-0.407926 -0.320512,-0.728442 -0.320513,-0.320511 -0.728439,-0.291375 H 14.577781 V 6.26457 q 0,-0.437066 -0.320513,-0.728441 Q 13.936755,5.244754 13.52883,5.215617 h -2.068765 q -0.437063,0 -0.728438,0.320512 -0.291375,0.320516 -0.320513,0.728441 v 4.166664 H 6.2444474 q -0.4079254,0 -0.7284379,0.291375 -0.3205129,0.291375 -0.2913754,0.728442 v 2.097898 q 0,0.407926 0.2913754,0.728442 0.291375,0.320511 0.7284379,0.291375 h 4.1666666 v 4.166664 q 0,0.437066 0.320513,0.728441 0.320513,0.291375 0.728438,0.320512 h 2.068765 q 0.437063,0 0.728438,-0.320512 0.291375,-0.320516 0.320513,-0.728441 v -4.166664 h 4.166666 q 0.407926,0 0.728439,-0.291375 0.320512,-0.291375 0.320512,-0.728442 z M 24.979879,12.5 q 0,3.40909 -1.66084,6.26457 Q 21.6582,21.620047 18.773585,23.310023 15.88897,25 12.509016,25 9.129063,25 6.2153099,23.310023 3.301557,21.620047 1.6989929,18.76457 0.0964288,15.90909 0.00901621,12.5 -0.07839637,9.09091 1.6989929,6.23543 3.4763822,3.379953 6.2153099,1.689977 8.9542376,0 12.509016,0 q 3.554779,0 6.264569,1.689977 2.70979,1.689976 4.545454,4.545453 1.835665,2.85548 1.66084,6.26457 z"
id="path2"
inkscape:connector-curvature="0"
style="stroke-width:0.02913753" />
</svg>

After

Width:  |  Height:  |  Size: 2.6 KiB

29
superx/xml/js/viz/viz_functions.js

@ -44,6 +44,7 @@ function chartModel(id,name,renderer,datasources) @@ -44,6 +44,7 @@ function chartModel(id,name,renderer,datasources)
this.chartElements=new Array();
this.options=new Object;
this.options.marks=new Array();
this.options.sort=new Array();
//let globalProperties={};
this.getChartSVG = function () {
@ -173,7 +174,7 @@ var valueOptions=[]; @@ -173,7 +174,7 @@ var valueOptions=[];
var optionCounter=0;
//selectionRsMetaData=fillSelectionResultMetaData();
//console.log("felder"+selectionRsMetaData.length);
var isDefault=true;
var isDefault=false;
for(var j=0;j < rsColumnMetaData[datasource].length;j++)
{
if(rsColumnMetaData[datasource][j].colcaption.trim() !=""
@ -341,7 +342,7 @@ function renderChart(chartDiv,currentChartModel) @@ -341,7 +342,7 @@ function renderChart(chartDiv,currentChartModel)
if(document.getElementById("chartName").value=="")
document.getElementById("chartName").value=vizInitialName;
if(currentChartModel.chartElements.length>0)
if(currentChartModel.chartElements.length>0 && currentChartModel.chartElements[0])
{
var mySVG=currentChartModel.getChartSVG();
if(typeof mySVG === 'object')
@ -482,18 +483,7 @@ function createChartElementsConfig2Form(renderer) @@ -482,18 +483,7 @@ function createChartElementsConfig2Form(renderer)
        }
saveBtnDiv.appendChild(saveBtn);
elementDivBox.appendChild(saveBtnDiv);
//remove:
const removeBtnDiv = document.createElement("div");
const removeBtn = document.createElement("input");
removeBtn.type="BUTTON";
removeBtn.value="Entfernen";
removeBtn.classList.add("button");
removeBtn.classList.add("is-small");
removeBtn.onclick =function() {
            removeChartElementConfig()
        }
removeBtnDiv.appendChild(removeBtn);
elementDivBox.appendChild(removeBtnDiv);
formChartElementConfig2Div.appendChild(elementDivBox);
/*columnsDiv.appendChild(columnDiv);
@ -547,7 +537,7 @@ function saveChartElementConfig() @@ -547,7 +537,7 @@ function saveChartElementConfig()
while (formChartElementConfig2Div.firstChild) {
formChartElementConfig2Div.removeChild(formChartElementConfig2Div.firstChild);
}
document.getElementById("vizElementCounter").value=myChartModel.chartElements.length;
renderChart('chartDiv',myChartModel);
/*var marksArray=new Array();
@ -565,15 +555,18 @@ function removeChartElementConfig() @@ -565,15 +555,18 @@ function removeChartElementConfig()
{
var propertyCounter=myChartModel.chartElements.length;
var elemID=document.getElementById("chartElementID").value;
if(propertyCounter>0)
{
var elemID=myChartModel.chartElements[propertyCounter-1].nr;
/*var filtered=myChartModel.chartElements.filter(obj => obj.nr !== propertyCounter-1);
myChartModel.chartElements=filtered;*/
delete myChartModel.chartElements[propertyCounter-1];
//delete myChartModel.chartElements[propertyCounter-1];
myChartModel.chartElements.pop();
elemID--;
if(document.getElementById("chartElementID"))
document.getElementById("chartElementID").value=elemID;
document.getElementById("vizElementCounter").value=myChartModel.chartElements.length;
renderChart('chartDiv',myChartModel);
}
}

20
superx/xml/viz_html_chart.xsl

@ -298,7 +298,14 @@ var newVizTypeProperty = new vizTypeProperty("</xsl:text> @@ -298,7 +298,14 @@ var newVizTypeProperty = new vizTypeProperty("</xsl:text>
<xsl:text>","</xsl:text>
<xsl:value-of select="@viz_property_group_uniquename" />
<xsl:text>",</xsl:text>
<xsl:value-of select="@is_mandatory" />
<xsl:choose>
<xsl:when test="@is_mandatory='1'">
<xsl:text>true</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text>false</xsl:text>
</xsl:otherwise>
</xsl:choose>
<xsl:text>,""
);
vizTypeProperties.push(newVizTypeProperty);
@ -1850,7 +1857,9 @@ rs[</xsl:text><xsl:value-of select="$tableId"/><xsl:text>].push(new dataRow_</xs @@ -1850,7 +1857,9 @@ rs[</xsl:text><xsl:value-of select="$tableId"/><xsl:text>].push(new dataRow_</xs
<div id="ChartElementListDiv">
</div>
<div id="ChartElementListFooterDiv">
<a onClick="createChartElementConfig1Form(document.getElementById('fldVizRenderer').value,null)">Neues Element</a>
Elemente: <input class="is-small" type="text" size="1" name="vizElementCounter" id="vizElementCounter" value="0" readonly="readonly" style="background-color:#cccccc;"/>
<a onClick="createChartElementConfig1Form(document.getElementById('fldVizRenderer').value,null)"><img src="../images/plus-circled.svg" width="12" height="12" title="Neues Element anlegen" /></a>
<span class="separator">&#160;</span><a onClick="removeChartElementConfig()"><img src="../images/minus-circled.svg" width="12" height="12" title="Letztes Element entfernen" /></a>
</div>
<div id="ChartElementConfig1Div"> </div>
<div id="ChartElementConfig2Div"> </div>
@ -1864,11 +1873,8 @@ rs[</xsl:text><xsl:value-of select="$tableId"/><xsl:text>].push(new dataRow_</xs @@ -1864,11 +1873,8 @@ rs[</xsl:text><xsl:value-of select="$tableId"/><xsl:text>].push(new dataRow_</xs
<div id="chartDiv"><svg viewBox="0 0 650 450">
<rect x="0" y="0" width="650" height="450" fill=""></rect>
<path fill="#5a9900" d="M20,20 h300 v100 h-100 v100 h-200 z" />
<path fill="#c32e04" d="M320,20 h200 v200 h-200 z" />
<path fill="#dfac20" d="M220,120 h100 v100 h100 v100 h-100 v100 h-100 z" />
<path fill="#3983ab" d="M420,220 h200 v100 h-100 v100 h-200 v-100 h100 z" />
<rect x="0" y="0" width="650" height="450" fill="#cccccc"></rect>
</svg></div>
</div>

Loading…
Cancel
Save