diff --git a/src-modules/module/viz/masken/44220_felderinfo.unl b/src-modules/module/viz/masken/44220_felderinfo.unl index c5e9f2f..e1ce393 100644 --- a/src-modules/module/viz/masken/44220_felderinfo.unl +++ b/src-modules/module/viz/masken/44220_felderinfo.unl @@ -3,14 +3,14 @@ FROM rpta_column_layout \ where resultset_id in (select R.tid from rpta_resultset R where R.uniquename in ('sos_stud_astat')\ and R.systeminfo_id=7)\ -and uniquename in ('sos_stud_geschl')\ +and uniquename in ('sos_stud_geschl_dashboard')\ order by sortnr, caption\ ;^^<>SELECT uniquename,\ caption\ FROM rpta_column_layout \ where resultset_id in (select R.tid from rpta_resultset R where R.uniquename in ('sos_stud_astat')\ and R.systeminfo_id=7)\ -and uniquename in ('sos_stud_geschl')\ +and uniquename in ('sos_stud_geschl_dashboard')\ order by sortnr, caption limit 1\ ;^ 44221^Seit Semester^10^0^0^140^80^1^integer^30^0^1^<> select tid, eintrag from semester order by tid DESC;^ ^<> select tid,eintrag from semester where today() between sem_beginn and sem_ende;^ diff --git a/src-modules/module/viz/masken/44220_maskeninfo.unl b/src-modules/module/viz/masken/44220_maskeninfo.unl index bd61fe4..d387c37 100644 --- a/src-modules/module/viz/masken/44220_maskeninfo.unl +++ b/src-modules/module/viz/masken/44220_maskeninfo.unl @@ -1 +1 @@ -44220^Studierende nach Geschlecht^select select_stmt from maskeninfo where tid=48000^select xil_proplist from maskeninfo where tid=48000^Studienfach^Anzahl bzw. Anteil^Ausgabe der Studierenden nach Geschlecht in verschiedenen Visualisierungen (z.B. Tortendiagramm)^select cleanup_stmt from maskeninfo where tid=48000^^2^850^540^^1^<>SELECT description FROM rpta_column_layout where tid=<>;^ +44220^Studierende nach Geschlecht^select select_stmt from maskeninfo where tid=48180^select xil_proplist from maskeninfo where tid=48180^Studienfach^Anzahl bzw. Anteil^Ausgabe der Studierenden nach Geschlecht in verschiedenen Visualisierungen (z.B. Tortendiagramm)^select cleanup_stmt from maskeninfo where tid=48000^^2^850^540^^1^<>SELECT description FROM rpta_column_layout where tid=<>;^ diff --git a/src-modules/module/viz/schluesseltabellen/rpta_column_layout_sos_stud_geschl_fuellen.sql b/src-modules/module/viz/schluesseltabellen/rpta_column_layout_sos_stud_geschl_fuellen.sql index d8350e2..0e6f97b 100644 --- a/src-modules/module/viz/schluesseltabellen/rpta_column_layout_sos_stud_geschl_fuellen.sql +++ b/src-modules/module/viz/schluesseltabellen/rpta_column_layout_sos_stud_geschl_fuellen.sql @@ -8,12 +8,14 @@ select count(*) from systeminfo where tid=330; <#assign rpta_column_layout = {"uniquename":"sos_stud_geschl_dashboard", "caption":"Studierende nach Geschlecht", -"rpta_resultset":"sos_stud_astat_dashboard", -"whereclause":"", -"description":"Studierende nach Geschlecht für Dashboard" +"rpta_resultset":"sos_stud_astat", +"whereclause":"stichtag=(select I.tid from sos_stichtag I where I.appl_key=''0'')", +"description":"Studierende nach Geschlecht für Dashboard", +"is_virtual":0 } /> + <#assign rpta_columns = [ {"uniquename":"geschlecht", "caption":"Geschlecht (Schlüssel)", @@ -26,7 +28,8 @@ select count(*) from systeminfo where tid=330; "visible_size":"5", "is_aggregate":"0", "description":"Geschlecht" -},{"uniquename":"geschlecht_str", +}, +{"uniquename":"geschlecht_str", "caption":"Geschlecht", "srcfieldname":"", "targetfieldname":"geschlecht_str", @@ -38,6 +41,30 @@ select count(*) from systeminfo where tid=330; "is_aggregate":"0", "description":"Geschlecht" }, +{"uniquename":"sem_rueck_beur_ein", +"caption":"Semester", +"srcfieldname":"sem_rueck_beur_ein", +"targetfieldname":"", +"column_type":"physicalColumn", +"col_function":"", +"is_visible":"1", +"format_code":"", +"visible_size":"5", +"is_aggregate":"0", +"description":"Semester" +}, +{"uniquename":"tid_stg", +"caption":"Studiengang", +"srcfieldname":"tid_stg", +"targetfieldname":"", +"column_type":"physicalColumn", +"col_function":"", +"is_visible":"0", +"format_code":"", +"visible_size":"5", +"is_aggregate":"0", +"description":"Studiengang" +}, {"uniquename":"summe", "caption":"Anzahl der Studierenden", "srcfieldname":"summe", diff --git a/superx/xml/js/viz/viz_assistent.js b/superx/xml/js/viz/viz_assistent.js index 643aba5..04ccd64 100644 --- a/superx/xml/js/viz/viz_assistent.js +++ b/superx/xml/js/viz/viz_assistent.js @@ -447,7 +447,7 @@ function createChartElementsConfig2Form(renderer,elemID) //chartElement-specific properties: //without Dimensions and measures: - for(var k=0;k < vizTypeProperties.length;k++) + /*for(var k=0;k < vizTypeProperties.length;k++) { if(vizType==vizTypeProperties[k].typeUniquename && vizTypeProperties[k].groupUniquename!="CATEGORY" @@ -469,7 +469,7 @@ function createChartElementsConfig2Form(renderer,elemID) } } - } + }*/ const saveBtnDiv = document.createElement("div"); @@ -689,7 +689,7 @@ function showChartPropertiesFormDiv(formDiv,formElementsDiv,renderer) switch (formDiv) { case "generalChartPropertiesFormDiv": - renderGeneralChartPropertiesForm(formElementsDiv,commonChartProperties,myChartModel.renderer); + renderGeneralChartPropertiesForm(formElementsDiv,commonChartProperties,myChartModel); break; case "ChartElementsDiv": createChartElementConfig1Form(myChartModel.renderer,null); @@ -902,7 +902,7 @@ function renderDimensionFieldAlt(vizTypeProperty,datasource,selectedValue) } -function renderGeneralChartPropertiesForm(formDiv,myCommonChartProperties,renderer) +function renderGeneralChartPropertiesForm(formDiv,myCommonChartProperties,currentChartModel) { //first empty form: var myForm=document.getElementById(formDiv); @@ -914,7 +914,7 @@ function renderGeneralChartPropertiesForm(formDiv,myCommonChartProperties,render var previousGroup=""; for(var k=0;k < myCommonChartProperties.length;k++) { - if(myCommonChartProperties[k].rendererUniquename==renderer || myCommonChartProperties[k].isGeneric==1) + if(myCommonChartProperties[k].rendererUniquename==currentChartModel.renderer || myCommonChartProperties[k].isGeneric==1) { var groupUniquename=myCommonChartProperties[k].groupUniquename; if(groupUniquename!="" @@ -966,10 +966,10 @@ function renderGeneralChartPropertiesForm(formDiv,myCommonChartProperties,render { if(myCommonChartProperties[k].groupUniquename==commonChartPropertyGroups[i].groupUniquename && myCommonChartProperties[k].variableName!="" - //&& isChartPropertyValidForChartelements(myCommonChartProperties[k]) - && !isChartPropertyValidForChartelements(myCommonChartProperties[k]) - && (myCommonChartProperties[k].rendererUniquename==renderer - || myCommonChartProperties[k].isGeneric==1) + //&& !isChartPropertyValidForChartelements(myCommonChartProperties[k],currentChartModel) + && (myCommonChartProperties[k].rendererUniquename==currentChartModel.renderer + //|| myCommonChartProperties[k].isGeneric==1 + ) ) { columnGroupBodyDiv.appendChild(renderChartPropertyField(null,myCommonChartProperties[k],true)); diff --git a/superx/xml/js/viz/viz_viewer.js b/superx/xml/js/viz/viz_viewer.js index 67256b9..3bae065 100644 --- a/superx/xml/js/viz/viz_viewer.js +++ b/superx/xml/js/viz/viz_viewer.js @@ -508,7 +508,7 @@ switch (chartType) .attr("transform", "translate(" + margin.left + "," + margin.top + ")") ; - mySvg=makeSunburstD3(currentChartModel.chartPropertiesUsed,mySvg,data,rsColumnMetaData[chartElem.datasource],chartElem); + mySvg=makeSunburstD3(currentChartModel.chartPropertiesUsed,mySvg,rs[0],rsColumnMetaData[chartElem.datasource],chartElem); break; @@ -520,6 +520,180 @@ switch (chartType) return mySvg; } +function makeSunburstD3(myCommonChartProperties,svg,data,metaData,chartElem) +{ + var sorted = d3.sort(data, d => d.dim_studiengang_fb_str,d => d.dim_studiengang_abschluss_grp_str, d => d.dim_studiengang_stg_str, d => d.summe); + var group = d3.group(sorted, d => d.dim_studiengang_fb_str,d => d.dim_studiengang_abschluss_grp_str, d => d.dim_studiengang_stg_str , d => d.summe ); + + //var sorted = d3.sort(data, d => d.dim_studiengang_fb_str,d => d.dim_studiengang_abschluss_grp_str, d => d.measure1); + +//var group = d3.group(sorted, d => d.sos_stg_aggr_sem_rueck_beur_ein_str); +//console.log(group); + + + + //var group = d3.group(sorted, d => d.dim_studiengang_fb_str,d => d.dim_studiengang_abschluss_grp_str, d => d.measure1 ); + var hierarchy = d3.hierarchy(group); + + var level1count=hierarchy.children.length; + console.log("level1count:"+level1count); + var data_str = "{\"name\":\"root\",\"children\":["; + +for(var i=0; i < level1count ; i++){ +console.log("Zeile "+i+ ":" + hierarchy.children[i].data[0]); +data_str+="{\"name\":\""+hierarchy.children[i].data[0]+"\",\"children\":["; +var level2count=hierarchy.children[i].children.length; +for(var j=0; j < level2count ; j++){ +console.log("unterZeile "+j+ ":" + hierarchy.children[i].children[j].data[0]); +data_str+="{\"name\":\""+hierarchy.children[i].children[j].data[0]+"\",\"children\":["; + +/*var level3count=hierarchy.children[i].children[j].children.length; +console.log("level3count: "+level3count); + +for(var k=0; k < level3count ; k++){ +console.log("unterUnterZeile "+k+ ":" + hierarchy.children[i].children[j].children[k].data[0]); +data_str+="{\"name\":\""+hierarchy.children[i].children[j].children[k].data[0]+"\",\"value\":"+hierarchy.children[i].children[j].children[k].children[0].data[0] +"}"; +if(k < level3count -1) + data_str+=","; + +} +*/ +data_str+="]}"; +if(j < level2count -1) + data_str+=","; +} +data_str+="]}"; +if(i < level1count -1) + data_str+=","; +//console.log("Zeile "+i+ ":" + hierarchy.children[i].children[0].data); +} +data_str+="]}" +console.log(data_str); +var dataHierarchy=JSON.parse(data_str); + +return renderSunburst(dataHierarchy,svg); +} +function renderSunburst(data,svg) { + // Specify the chart’s dimensions. + const width = 928; + const height = width; + const radius = width / 6; + + // Create the color scale. + const color = d3.scaleOrdinal(d3.quantize(d3.interpolateRainbow, data.children.length + 1)); + + // Compute the layout. + const hierarchy = d3.hierarchy(data) + .sum(d => d.value) + .sort((a, b) => b.value - a.value); + const root = d3.partition() + .size([2 * Math.PI, hierarchy.height + 1]) + (hierarchy); + root.each(d => d.current = d); + + // Create the arc generator. + const arc = d3.arc() + .startAngle(d => d.x0) + .endAngle(d => d.x1) + .padAngle(d => Math.min((d.x1 - d.x0) / 2, 0.005)) + .padRadius(radius * 1.5) + .innerRadius(d => d.y0 * radius) + .outerRadius(d => Math.max(d.y0 * radius, d.y1 * radius - 1)) + + // Create the SVG container. + // Append the arcs. + const path = svg.append("g") + .selectAll("path") + .data(root.descendants().slice(1)) + .join("path") + .attr("fill", d => { while (d.depth > 1) d = d.parent; return color(d.data.name); }) + .attr("fill-opacity", d => arcVisible(d.current) ? (d.children ? 0.6 : 0.4) : 0) + .attr("pointer-events", d => arcVisible(d.current) ? "auto" : "none") + + .attr("d", d => arc(d.current)); + + // Make them clickable if they have children. + path.filter(d => d.children) + .style("cursor", "pointer") + .on("click", clicked); + + const format = d3.format(",d"); + path.append("title") + .text(d => `${d.ancestors().map(d => d.data.name).reverse().join("/")}\n${format(d.value)}`); + + const label = svg.append("g") + .attr("pointer-events", "none") + .attr("text-anchor", "middle") + .style("user-select", "none") + .selectAll("text") + .data(root.descendants().slice(1)) + .join("text") + .attr("dy", "0.35em") + .attr("fill-opacity", d => +labelVisible(d.current)) + .attr("transform", d => labelTransform(d.current)) + .text(d => d.data.name); + + const parent = svg.append("circle") + .datum(root) + .attr("r", radius) + .attr("fill", "none") + .attr("pointer-events", "all") + .on("click", clicked); + + // Handle zoom on click. + function clicked(event, p) { + parent.datum(p.parent || root); + + root.each(d => d.target = { + x0: Math.max(0, Math.min(1, (d.x0 - p.x0) / (p.x1 - p.x0))) * 2 * Math.PI, + x1: Math.max(0, Math.min(1, (d.x1 - p.x0) / (p.x1 - p.x0))) * 2 * Math.PI, + y0: Math.max(0, d.y0 - p.depth), + y1: Math.max(0, d.y1 - p.depth) + }); + + const t = svg.transition().duration(750); + + // Transition the data on all arcs, even the ones that aren’t visible, + // so that if this transition is interrupted, entering arcs will start + // the next transition from the desired position. + path.transition(t) + .tween("data", d => { + const i = d3.interpolate(d.current, d.target); + return t => d.current = i(t); + }) + .filter(function(d) { + return +this.getAttribute("fill-opacity") || arcVisible(d.target); + }) + .attr("fill-opacity", d => arcVisible(d.target) ? (d.children ? 0.6 : 0.4) : 0) + .attr("pointer-events", d => arcVisible(d.target) ? "auto" : "none") + + .attrTween("d", d => () => arc(d.current)); + + label.filter(function(d) { + return +this.getAttribute("fill-opacity") || labelVisible(d.target); + }).transition(t) + .attr("fill-opacity", d => +labelVisible(d.target)) + .attrTween("transform", d => () => labelTransform(d.current)); + } + + function arcVisible(d) { + return d.y1 <= 3 && d.y0 >= 1 && d.x1 > d.x0; + } + + function labelVisible(d) { + return d.y1 <= 3 && d.y0 >= 1 && (d.y1 - d.y0) * (d.x1 - d.x0) > 0.03; + } + + function labelTransform(d) { + const x = (d.x0 + d.x1) / 2 * 180 / Math.PI; + const y = (d.y0 + d.y1) / 2 * radius; + return `rotate(${x - 90}) translate(${y},0) rotate(${x < 180 ? 0 : 180})`; + } + + return svg.node(); + +} + function makePie_d3(myCommonChartProperties,svg,data,chartElem,width,height) { //const width = 928; @@ -1989,3 +2163,9 @@ function numberFormatter(value,axisType,digits,usedLocale) else return value ; } +function closeModalCard(elemId) +{ +var myModalCard=document.getElementById(elemId); +myModalCard.classList.remove('is-active'); + +} diff --git a/superx/xml/viz_components.xsl b/superx/xml/viz_components.xsl index 3f64242..035fd4d 100644 --- a/superx/xml/viz_components.xsl +++ b/superx/xml/viz_components.xsl @@ -494,13 +494,6 @@ var myRenderer=' - @@ -876,105 +869,10 @@ Stand:

- - - - - - - - - - - - - - - + @@ -1016,6 +914,7 @@ Stand:

+ @@ -1025,6 +924,7 @@ Stand:

+
@@ -1043,6 +943,7 @@ Stand:

+ @@ -1071,7 +972,7 @@ Stand:

- + @@ -1088,11 +989,15 @@ Stand:

+
+ + +
@@ -1114,6 +1019,25 @@ Stand:

Details...
+
+ + + +openKachelDetails( +,' + +', + +,' + +',' + +',false); + +
+
+
+
 |  @@ -1194,8 +1118,8 @@ Platzhalter - - + + @@ -1210,7 +1134,7 @@ Platzhalter - + " value=" " @@ -1218,6 +1142,7 @@ Platzhalter ]]> + @@ -1234,7 +1159,7 @@ Platzhalter
- @@ -1352,26 +1277,25 @@ Platzhalter ');
-
-

- +

+ -

+ + +
-   -   -
-

+ +

- - +
+ @@ -1406,19 +1330,10 @@ Platzhalter - -

-   -   -   -   +
+
- -
+
@@ -1454,12 +1369,7 @@ Platzhalter - - - - - @@ -1495,18 +1405,44 @@ Platzhalter - - - + + + + -
-
+
+
-
+

@@ -1553,7 +1489,7 @@ Platzhalter -
    +
      @@ -1591,7 +1527,7 @@ Platzhalter -
    • +
    • @@ -1682,11 +1618,32 @@ Platzhalter -
      +
      -

      -Tabelle

      - +

      +Datentabelle

      + + @@ -1789,5 +1746,413 @@ Platzhalter
      + + + + + + + + +
      + + +
      +
      + + + +
      +
      +
      +
      +

      + + + + + + + + + + +
      +
      +
      +
      +
      + + + + + + + + + + + + + + + + + + + + + + + + + :  + + + + + ... + + + + - Stand: + + + + ; + + +   + + + + + +
      + +Infos + +Maske +
      +
      + + + + + + + +false + + +true + + + diff --git a/superx/xml/viz_html_chart.xsl b/superx/xml/viz_html_chart.xsl index c42d29e..0b1861c 100644 --- a/superx/xml/viz_html_chart.xsl +++ b/superx/xml/viz_html_chart.xsl @@ -734,7 +734,7 @@ xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:HtmlUtils="de.superx.util - +     diff --git a/superx/xml/viz_html_chart_viewer_grid.xsl b/superx/xml/viz_html_chart_viewer_grid.xsl index e6ad439..59d45e9 100644 --- a/superx/xml/viz_html_chart_viewer_grid.xsl +++ b/superx/xml/viz_html_chart_viewer_grid.xsl @@ -48,12 +48,13 @@ xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:HtmlUtils="de.superx.util - + + @@ -71,7 +72,7 @@ xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:HtmlUtils="de.superx.util -
      +
      @@ -87,8 +88,17 @@ xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:HtmlUtils="de.superx.util - +
      +
      + + + +
      + + + +
      diff --git a/superx/xml/viz_html_chart_viewer_mask_and_table.xsl b/superx/xml/viz_html_chart_viewer_mask_and_table.xsl index 65f597f..f924712 100644 --- a/superx/xml/viz_html_chart_viewer_mask_and_table.xsl +++ b/superx/xml/viz_html_chart_viewer_mask_and_table.xsl @@ -134,6 +134,7 @@ xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:HtmlUtils="de.superx.util + @@ -141,11 +142,13 @@ xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:HtmlUtils="de.superx.util
      -
      + + + +
      -->