Browse Source

Visualisierung mit Kreuztabellen #16

master
Daniel Quathamer 1 day ago
parent
commit
5370765779
  1. 72
      src-modules/module/viz/conf/viz.xml
  2. 2
      src-modules/module/viz/masken/44720_felderinfo.unl
  3. 1
      src-modules/module/viz/masken/44750_felderinfo.unl
  4. 1
      src-modules/module/viz/masken/44750_maske_system_bez.unl
  5. 1
      src-modules/module/viz/masken/44750_masken_felder_bez.unl
  6. 46
      src-modules/module/viz/masken/44750_maskeninfo.unl
  7. 1
      src-modules/module/viz/masken/44750_sachgeb_maske_bez.unl
  8. 161
      src-modules/module/viz/schluesseltabellen/fm_templates.unl
  9. 4
      src-modules/module/viz/schluesseltabellen/macro_masken_bez_fuellen.sql
  10. 12
      src-modules/module/viz/schluesseltabellen/sx_stylesheets_einfuegen.sql
  11. 67
      src-modules/module/viz/schluesseltabellen/viz_chart.unl
  12. 11
      src-modules/module/viz/schluesseltabellen/viz_colorscheme_fuellen.sql
  13. 131
      src-modules/module/viz/schluesseltabellen/viz_dashboard_STUDABSOLV_fuellen.sql
  14. 106
      src-modules/module/viz/schluesseltabellen/viz_dashboard_STUD_fuellen.sql
  15. 250
      src-modules/module/viz/schluesseltabellen/viz_dashboard_element_fuellen.sql
  16. 250
      src-modules/module/viz/schluesseltabellen/viz_properties_basistools_fuellen.sql
  17. 58
      src-modules/module/viz/schluesseltabellen/viz_properties_viz_basistools_crosstab_fuellen.sql
  18. 54
      src-modules/module/viz/schluesseltabellen/viz_properties_viz_basistools_simple_table_fuellen.sql
  19. 1
      src-modules/module/viz/schluesseltabellen/viz_renderer.unl
  20. 231
      superx/xml/js/viz/viz_viewer.js
  21. 28
      superx/xml/viz_components.xsl
  22. 2
      superx/xml/viz_html_chart.xsl
  23. 7
      superx/xml/viz_html_chart_viewer_mask_and_table.xsl

72
src-modules/module/viz/conf/viz.xml

@ -127,6 +127,7 @@ rightname="CS_BIA_STANDARDREPORTS_ADMIN[VIZ]" /> @@ -127,6 +127,7 @@ rightname="CS_BIA_STANDARDREPORTS_ADMIN[VIZ]" />
<column name="mask_params" type="TEXT" size="255" default="" notnull="" description="Maskenparameter" />
<column name="renderer_id" type="INTEGER" size="" default="" notnull="true" description="Renderer" isKey=""/>
<column name="chartmodel_miniature" type="TEXT" size="255" default="" notnull="" description="Quellcode des Diagramms (Miniatur)" />
<column name="chartmodel_detail" type="TEXT" size="255" default="" notnull="" description="Quellcode des Diagramms (Detail)" />
<column name="chart_position" type="CHAR" size="10" default="" notnull="" description="Position des Diagramms"><comment>CENTER,TOP,BOTTOM,LEFT,RIGHT,INLINE</comment></column>
<column name="chart_active" type="SMALLINT" size="2"
default="1" notnull="false" description="Grafik aktiv"></column>
@ -628,6 +629,41 @@ caption="Staaten (Geocodes)" releaseUnload="demo"> @@ -628,6 +629,41 @@ caption="Staaten (Geocodes)" releaseUnload="demo">
</primaryKeys>
<indexes>
</indexes>
</table>
<table name="viz_dashboard_element" thema="Visualisierungen" typ="Datentabelle"
releaseUnload="demo">
<description>Dashboard-Elemente</description>
<columns>
<column name="tid" type="SERIAL" size="" default="" notnull="true" description="tid" isKey="true"/>
<column name="dashboard_id" type="INTEGER" size="255" default="" isKey="true" notnull="true" description="Dashboard" />
<column name="datasource_type" type="INTEGER" size="255" default="1" notnull="" description="Datenquelle Art" ><comment>1=Makrobericht</comment></column>
<column name="datasource" type="VARCHAR" size="255" default="" notnull="" description="Datenquelle" ><comment>Bei Makroberichten die Ergebniselement-Nr., perspektivisch bei REST API der REST-Aufruf</comment></column>
<column name="chart_id" type="INTEGER" size="255" default="" notnull="" description="Grafik" />
<column name="caption" type="VARCHAR" size="255" default="" notnull="" description="Bezeichnung" />
<column name="onclick_event" type="VARCHAR" size="255" default="" notnull="" description="Mausklick-Ereignis" ><comment>JS-Hander, wenn auf das Element geklickt wird</comment></column>
<column name="sortnr" type="SMALLINT" size="255" default="0" notnull="false" description="Sortiernr." sortable="true" ><comment></comment></column>
<column name="description" type="VARCHAR" size="255" default="" notnull="" description="Beschreibung" />
<column name="open_modal_card_detail" type="SMALLINT" size="255" default="1" notnull="" description="Grafik bei Mausklick vergrößern" />
<column name="link_maskennummer" type="INTEGER" size="255" default="" notnull="" description="Detail-Maske" />
<column name="link_chart_uniquename" type="VARCHAR" size="255" default="" notnull="" description="Detail-Maske Grafik" />
<column name="link_tablestylesheet" type="VARCHAR" size="255" default="" notnull="" description="Detail-Maske Stylesheet" />
<column name="active" type="SMALLINT" size="" default="1"
notnull="true" description="Aktiv" />
</columns>
<primaryKeys><rs>
<row>
<fld name='table_cat'>superx</fld>
<fld name='table_schem'>superx</fld>
<fld name='table_name'>viz_dashboard_element</fld>
<fld name='column_name'>tid</fld>
<fld name='key_seq'>1</fld>
<fld name='pk_name'>viz_dashboard_element_pk</fld>
</row>
</rs>
</primaryKeys>
<indexes>
</indexes>
</table>
@ -803,6 +839,12 @@ parent="Visualisierungen">Abfragen zur Administration von Visualisierungen </the @@ -803,6 +839,12 @@ parent="Visualisierungen">Abfragen zur Administration von Visualisierungen </the
<path>$VIZ_PFAD/masken</path>
</src>
</maske>
<maske tid="44750" name="Dashboard-Elemente" thema="">
<description> </description>
<src>
<path>$VIZ_PFAD/masken</path>
</src>
</maske>
</masken>
@ -936,30 +978,6 @@ gueltig_bis DATE @@ -936,30 +978,6 @@ gueltig_bis DATE
version integer default 1
) ;"
scriptfile="" database=""/>
<nativeaction sql="create table tmp_viz_dashboard(
tid SERIAL not null,
uniquename VARCHAR(255) not null,
caption VARCHAR(255) ,
maskeninfo_id INTEGER ,
booklet_stylesheet VARCHAR(255) ,
gridtitle_felderinfo_id integer
)
;" scriptfile="" database=""/>
<nativeaction sql="create table tmp_viz_dashboard_tab(
tid SERIAL not null,
dashboard_id INTEGER not null,
caption VARCHAR(255) ,
maskeninfo_id INTEGER ,
sortnr SMALLINT default 0 ,
select_clause VARCHAR(255) ,
fact_table VARCHAR(255) ,
where_clause TEXT ,
optional_filter_name VARCHAR(255) ,
optional_filter_value VARCHAR(255) ,
booklet_stylesheet VARCHAR(255)
)
;" scriptfile="" database=""/>
</action>
<action error="stop">
@ -982,7 +1000,7 @@ booklet_stylesheet VARCHAR(255) @@ -982,7 +1000,7 @@ booklet_stylesheet VARCHAR(255)
<action error="stop">
<nativeaction sql="" scriptfile="$VIZ_PFAD/schluesseltabellen/sx_repository_fuellen.sql" database=""/>
<nativeaction sql="" scriptfile="$VIZ_PFAD/schluesseltabellen/fm_templates_fuellen.sql" database=""/>
<nativeaction sql="" scriptfile="$VIZ_PFAD/schluesseltabellen/viz_dashboard_tab_fuellen.sql" database=""/>
<nativeaction sql="" scriptfile="$VIZ_PFAD/schluesseltabellen/viz_dashboard_STUDABSOLV_fuellen.sql" database=""/>
<nativeaction sql="" scriptfile="$VIZ_PFAD/schluesseltabellen/sachgebiete_fuellen.sql" database=""/>
<nativeaction sql="" scriptfile="$VIZ_PFAD/schluesseltabellen/viz_colorscheme_fuellen.sql" database=""/>
@ -1185,8 +1203,6 @@ booklet_stylesheet VARCHAR(255) @@ -1185,8 +1203,6 @@ booklet_stylesheet VARCHAR(255)
<!--<loadtable refresh="true" delimiter="^" header="false" tabname="viz_type"><file path="$VIZ_PFAD/schluesseltabellen/viz_type.unl"/></loadtable>
<loadtable refresh="true" delimiter="^" header="false" tabname="viz_property"><file path="$VIZ_PFAD/schluesseltabellen/viz_property.unl"/></loadtable>
-->
<loadtable refresh="true" delimiter="^" header="false" tabname="tmp_viz_dashboard"><file path="$VIZ_PFAD/schluesseltabellen/viz_dashboard.unl"/></loadtable>
<loadtable refresh="true" delimiter="^" header="false" tabname="tmp_viz_dashboard_tab"><file path="$VIZ_PFAD/schluesseltabellen/viz_dashboard_tab.unl"/></loadtable>
<loadtable refresh="true" delimiter="^" header="false" tabname="viz_property_input_type"><file path="$VIZ_PFAD/schluesseltabellen/viz_property_input_type.unl"/></loadtable>
<loadtable refresh="true" delimiter="^" header="false" tabname="viz_property_group"><file path="$VIZ_PFAD/schluesseltabellen/viz_property_group.unl"/></loadtable>
<loadtable refresh="true" delimiter="^" header="false" tabname="viz_renderer"><file path="$VIZ_PFAD/schluesseltabellen/viz_renderer.unl"/></loadtable>
@ -1199,9 +1215,9 @@ booklet_stylesheet VARCHAR(255) @@ -1199,9 +1215,9 @@ booklet_stylesheet VARCHAR(255)
<action error="stop">
<nativeaction sql="" scriptfile="$VIZ_PFAD/schluesseltabellen/sx_repository_fuellen.sql" database=""/>
<nativeaction sql="" scriptfile="$VIZ_PFAD/schluesseltabellen/fm_templates_fuellen.sql" database=""/>
<nativeaction sql="" scriptfile="$VIZ_PFAD/schluesseltabellen/viz_dashboard_tab_fuellen.sql" database=""/>
<nativeaction sql="" scriptfile="$VIZ_PFAD/schluesseltabellen/viz_colorscheme_fuellen.sql" database=""/>
<nativeaction sql="" scriptfile="$VIZ_PFAD/schluesseltabellen/viz_chart_fuellen.sql" database=""/>
<nativeaction sql="" scriptfile="$VIZ_PFAD/schluesseltabellen/viz_dashboard_STUDABSOLV_fuellen.sql" database=""/>
<nativeaction sql="" scriptfile="$VIZ_PFAD/schluesseltabellen/sx_captions_fuellen.sql" database=""/>
<nativeaction sql="" scriptfile="$VIZ_PFAD/schluesseltabellen/konstanten_fuellen.sql" database=""/>

2
src-modules/module/viz/masken/44720_felderinfo.unl

@ -6,7 +6,7 @@ where sem_beginn >= today()-(182*${K_VIZ_ZEITR_SEM_ANZ} )\ @@ -6,7 +6,7 @@ where sem_beginn >= today()-(182*${K_VIZ_ZEITR_SEM_ANZ} )\
</#if>\
and sem_beginn <=today()\
order by tid DESC;^Eintrag^<<SQL>> select tid,eintrag from semester where today()-(4*365) between sem_beginn and sem_ende;^
44722^Stichtag Prüfungen^21^350^-1^140^100^1^sql^30^0^13^<<SQL>> select tid, name from sos_stichtag where stichtagsart='Prüfungen';^^<<SQL>> select tid, name from sos_stichtag where stichtagsart='Prüfungen' and appl_key='2';^
44722^Stichtag Prüfungen^21^350^-1^140^100^1^sql^30^0^1^<<SQL>> select tid, name from sos_stichtag where stichtagsart='Prüfungen';^^<<SQL>> select tid, name from sos_stichtag where stichtagsart='Prüfungen' and appl_key='2';^
44723^Staatsangehörigkeit^36^0^0^130^150^10^char^30^0^12^<<SQL>> select tid,name,sortnr from sichten where art='SOS-Staaten-Sicht' order by 3,2;^hidden^^
44724^viz_label_Studiengang^5^350^-1^150^180^1^char^200^0^8^^{InputCheck:matrikelnummern}^^
44725^Hörerstatus^33^0^0^140^170^1^sql^255^0^13^<<SQL>> select apnr, eintrag from hoererstatus order by 2^apnr, eintrag^<<SQL>> select apnr, eintrag from hoererstatus where eintrag='alle';^

1
src-modules/module/viz/masken/44750_felderinfo.unl

@ -0,0 +1 @@ @@ -0,0 +1 @@
44757^Dashboard^1000^300^-1^170^150^1^char^30^1^1^<<SQL>> select uniquename,uniquename from viz_dashboard order by 2;^ ^ ^

1
src-modules/module/viz/masken/44750_maske_system_bez.unl

@ -0,0 +1 @@ @@ -0,0 +1 @@
44750^320^

1
src-modules/module/viz/masken/44750_masken_felder_bez.unl

@ -0,0 +1 @@ @@ -0,0 +1 @@
44750^44757^

46
src-modules/module/viz/masken/44750_maskeninfo.unl

@ -0,0 +1,46 @@ @@ -0,0 +1,46 @@
44750^Dashboard-Elemente^select E.sortnr,\
C.caption as chart_caption,\
E.caption, \
D.uniquename as hiddendashboard_uniquename,\
E.datasource as hiddendatasource,\
C.uniquename as hiddenchart_uniquename,\
E.onclick_event as hiddenonclick_event,\
E.open_modal_card_detail as hiddenopen_modal_card_detail,\
link_maskennummer as hiddenlink_maskennummer,\
link_chart_uniquename as hiddenlink_chart_uniquename,\
link_tablestylesheet as hiddenlink_tablestylesheet\
FROM viz_dashboard_element E, viz_dashboard D, viz_chart C\
where E.dashboard_id=D.tid\
and E.chart_id=C.tid\
and D.uniquename=<<Dashboard>>\
and E.datasource_type=1 --Makrobericht\
and E.active=1\
order by E.sortnr;\
\
;^XIL List\
sizable_columns horizontal_scrolling\
white_space_color=COLOR_WHITE fixed_columns=1\
drop_and_delete movable_columns\
min_heading_height=55\
Column CID=0 heading_text="Nr." explanation="" center_heading\
row_selectable heading_platform readonly\
width=3\
Column CID=0 heading_text="Element" explanation="" center_heading\
row_selectable heading_platform readonly\
width=15\
Column CID=0 heading_text="Beschreibung" explanation="" center_heading\
row_selectable heading_platform readonly\
width=20\
Column CID=0 heading_text="Dashboard" explanation="" center_heading\
row_selectable heading_platform readonly\
width=40\
Column CID=0 heading_text="Datenquelle" explanation="" center_heading\
row_selectable heading_platform readonly\
width=10\
Column CID=0 heading_text="Grafik" explanation="" center_heading\
row_selectable heading_platform readonly\
width=10\
Column CID=0 heading_text="Onclick Event" explanation="" center_heading\
row_selectable heading_platform readonly\
width=30\
@@@^ ^ ^Liste der im Dashboard genutzten Elemente^ ^^3^700^360^0^1^ ^

1
src-modules/module/viz/masken/44750_sachgeb_maske_bez.unl

@ -0,0 +1 @@ @@ -0,0 +1 @@
320^44750^

161
src-modules/module/viz/schluesseltabellen/fm_templates.unl

@ -1,4 +1,4 @@ @@ -1,4 +1,4 @@
97^VIZ-Makros^<#macro create_temp_tables>\
171^VIZ-Makros^<#macro create_temp_tables>\
\
CREATE temp TABLE tmp_viz_property_renderer\
(\
@ -343,4 +343,163 @@ and P.prop_uniquename='${viz_prop.viz_property_uniquename}'\ @@ -343,4 +343,163 @@ and P.prop_uniquename='${viz_prop.viz_property_uniquename}'\
;\
</#foreach>\
\
</#macro>\
\
\
<#macro viz_dashboard_fuellen>\
insert into tmp_dashboard ( uniquename,\
caption,\
maskeninfo_id,\
booklet_stylesheet,\
gridtitle_felderinfo_id)\
select '${viz_dashboard.uniquename}',\
'${viz_dashboard.caption}',\
${viz_dashboard.maskeninfo_id},\
'${viz_dashboard.booklet_stylesheet}',\
${viz_dashboard.gridtitle_felderinfo_id}\
from xdummy;\
\
update tmp_dashboard T set tid=(select D.tid\
from viz_dashboard D\
where D.uniquename=T.uniquename);\
\
update viz_dashboard D set caption=T.caption,\
maskeninfo_id=T.maskeninfo_id,\
booklet_stylesheet=T.booklet_stylesheet,\
gridtitle_felderinfo_id=T.gridtitle_felderinfo_id\
from tmp_dashboard T\
where T.tid=D.tid;\
insert into viz_dashboard ( uniquename,\
caption,\
maskeninfo_id,\
booklet_stylesheet,\
gridtitle_felderinfo_id)\
select uniquename,\
caption,\
maskeninfo_id,\
booklet_stylesheet,\
gridtitle_felderinfo_id\
from tmp_dashboard T\
where T.tid is null;\
update tmp_dashboard T set tid=(select D.tid\
from viz_dashboard D\
where D.uniquename=T.uniquename)\
where T.tid is null;\
\
delete from viz_dashboard_tab\
where dashboard_id in (select T.tid\
from tmp_dashboard T);\
delete from viz_dashboard_element\
where dashboard_id in (select T.tid\
from tmp_dashboard T);\
\
\
<#foreach tab in viz_dashboard_tabs>\
insert into viz_dashboard_tab(dashboard_id,\
caption,\
maskeninfo_id,\
sortnr,\
select_clause,\
fact_table,\
where_clause,\
optional_filter_name,\
optional_filter_value,\
booklet_stylesheet)\
select\
T.tid as dashboard_id,\
'${tab.caption}' as caption,\
${tab.maskeninfo_id},\
${tab.sortnr},\
'${tab.select_clause}',\
'${tab.fact_table}',\
'${tab.where_clause}',\
'${tab.optional_filter_name}',\
'${tab.optional_filter_value}',\
'${tab.booklet_stylesheet}'\
from tmp_dashboard T;\
\
</#foreach>\
<#foreach elem in viz_dashboard_elements>\
insert into viz_dashboard_element(dashboard_id,\
datasource_type,\
datasource,\
chart_id,\
onclick_event,\
sortnr,\
caption,\
open_modal_card_detail,\
link_maskennummer,\
link_chart_uniquename,\
link_tablestylesheet, \
active)\
select\
T.tid as dashboard_id,\
${elem.datasource_type},\
'${elem.datasource}',\
V.tid as chart_id,\
'${elem.onclick_event}',\
${elem.sortnr},\
'${elem.caption}',\
${open_modal_card_detail},\
V.maskeninfo_id as link_maskennummer,\
V.uniquename as link_chart_uniquename,\
'${link_tablestylesheet}',\
${elem.active}\
from tmp_dashboard T, viz_chart V\
where V.uniquename='${elem.chart_uniquename}';\
\
</#foreach>\
</#macro>\
\
<#macro create_temp_tables_dashboard>\
\
create temp table tmp_dashboard(\
tid integer, \
uniquename VARCHAR(255) not null, \
caption VARCHAR(255) , \
maskeninfo_id INTEGER , \
booklet_stylesheet VARCHAR(255) , \
gridtitle_felderinfo_id INTEGER \
\
) \
;\
create temp table tmp_dashboard_tab(\
\
dashboard_id INTEGER not null, \
caption VARCHAR(255) , \
maskeninfo_id INTEGER , \
sortnr SMALLINT default 0 , \
select_clause VARCHAR(255) , \
fact_table VARCHAR(255) , \
where_clause TEXT , \
optional_filter_name VARCHAR(255) , \
optional_filter_value VARCHAR(255) , \
booklet_stylesheet VARCHAR(255) \
\
) \
;\
\
create temp table tmp_dashboard_element(\
dashboard_id INTEGER not null, \
datasource_type INTEGER default 1 , \
datasource VARCHAR(255) , \
chart_id INTEGER , \
onclick_event VARCHAR(255) , \
sortnr SMALLINT default 0 , \
caption VARCHAR(255) , \
open_modal_card_detail SMALLINT default 1 , \
link_maskennummer INTEGER , \
link_chart_uniquename VARCHAR(255) , \
link_tablestylesheet VARCHAR(255) , \
active SMALLINT default 1 not null\
) \
;\
\
</#macro>\
\
<#macro drop_temp_tables_dashboard>\
drop table if exists tmp_dashboard;\
drop table if exists tmp_dashboard_tab;\
drop table if exists tmp_dashboard_element;\
\
</#macro>^Makros zum Umgang mit Visualisierungen^ ^1^

4
src-modules/module/viz/schluesseltabellen/macro_masken_bez_fuellen.sql

@ -45,11 +45,13 @@ select tid from sos_stichtag where appl_key='4'; @@ -45,11 +45,13 @@ select tid from sos_stichtag where appl_key='4';
{"makro":"44190", "tid":"44600", "sortnr":"60"},
{"makro":"44660", "tid":"44630", "sortnr":"0"},
{"makro":"44660", "tid":"44750", "sortnr":"5"},
{"makro":"44660", "tid":"44570", "sortnr":"10"},
{"makro":"44660", "tid":"44570", "sortnr":"20"},
{"makro":"44660", "tid":"44570", "sortnr":"30"},
{"makro":"44690", "tid":"44630", "sortnr":"0"},
{"makro":"44690", "tid":"44750", "sortnr":"5"},
{"makro":"44690", "tid":"44570", "sortnr":"10"},
{"makro":"44690", "tid":"44570", "sortnr":"20"},
{"makro":"44690", "tid":"44570", "sortnr":"30"},
@ -165,6 +167,7 @@ select tid from sos_stichtag where appl_key='4'; @@ -165,6 +167,7 @@ select tid from sos_stichtag where appl_key='4';
{"makro":"44190", "sortnr":"60", "feldname":"Nur Endsemester", "value":"1"},
{"makro":"44660", "sortnr":"0", "feldname":"Dashboard", "value":"STUD"},
{"makro":"44660", "sortnr":"5", "feldname":"Dashboard", "value":"STUDABSOLV"},
{"makro":"44660", "sortnr":"10", "feldname":"Köpfe oder Fälle ?", "value":"studiengang_nr = 1 and fach_nr = 1"},
{"makro":"44660", "sortnr":"10", "feldname":"Spaltenlayout", "value":"sos_stud_sem_dashboard"},
@ -186,6 +189,7 @@ select tid from sos_stichtag where appl_key='4'; @@ -186,6 +189,7 @@ select tid from sos_stichtag where appl_key='4';
{"makro":"44660", "sortnr":"30", "feldname":"tablestylesheet", "value":"tabelle_html_datenblatt.xsl"},
{"makro":"44690", "sortnr":"0", "feldname":"Dashboard", "value":"STUDABSOLV"},
{"makro":"44690", "sortnr":"5", "feldname":"Dashboard", "value":"STUDABSOLV"},
{"makro":"44690", "sortnr":"10", "feldname":"Köpfe oder Fälle ?", "value":"studiengang_nr = 1 and fach_nr = 1"},
{"makro":"44690", "sortnr":"10", "feldname":"Spaltenlayout", "value":"sos_stud_sem_dashboard"},

12
src-modules/module/viz/schluesseltabellen/sx_stylesheets_einfuegen.sql

@ -43,6 +43,7 @@ @@ -43,6 +43,7 @@
{"mask":"44570", "filename":"viz_html_chart_viewer.xsl", "ord":"1"},
{"mask":"44570", "filename":"viz_html_chart_viewer_mask.xsl", "ord":"30"},
{"mask":"44570", "filename":"viz_html_chart_viewer_mask_and_table.xsl", "ord":"40"},
{"mask":"44570", "filename":"viz_html_chart_viewer_mask_and_tablechart.xsl", "ord":"50"},
{"mask":"44600", "filename":"tabelle_html_datenblatt.xsl", "ord":"10"},
{"mask":"44600", "filename":"viz_html_chart_viewer.xsl", "ord":"1"},
@ -138,6 +139,17 @@ @@ -138,6 +139,17 @@
"stylesheet_type":"XSL",
"jr_datasource":""
},
{"filename":"viz_html_chart_viewer_mask_and_tablechart.xsl",
"caption":"Diagramm, dynamische Tabelle + Maskenfelder",
"description":"Viewer-Stylesheet für VIZ Charts mit dynamischer Tabelle und Maskenfeldern",
"relation":"table",
"contenttype":"text/html",
"is_generic":"0",
"toolbar_icon_filepath":"",
"usage_resultset_data":"T",
"stylesheet_type":"XSL",
"jr_datasource":""
},
{"filename":"viz_report_44660_xmlsource.jrxml",
"caption":"Campus Dashboard Druckversion",
"description":"Ausgabe pro Reiter",

67
src-modules/module/viz/schluesseltabellen/viz_chart.unl

@ -46,10 +46,13 @@ title: {\ @@ -46,10 +46,13 @@ title: {\
}\
},\
xAxis: [\
{ type: 'category', axisLabel:{rotate:30}}\
{ type: 'category', axisLabel:{rotate:30, \
fontSize: 20\
}}\
],\
yAxis: [{name:'', nameLocation:'middle', nameGap:40,id:0, \
axisLabel: {\
fontSize: 20,\
formatter: (value) => value.toLocaleString()\
}\
}],\
@ -61,6 +64,7 @@ title: {\ @@ -61,6 +64,7 @@ title: {\
},\
label: {\
show: false,\
fontSize: 20,\
formatter: function (params) {\
return params.value[params.dimensionNames[params.encode.y[0]]].toLocaleString()\
}\
@ -72,6 +76,7 @@ title: {\ @@ -72,6 +76,7 @@ title: {\
},\
label: {\
show: false,\
fontSize: 20,\
formatter: function (params) {\
return params.value[params.dimensionNames[params.encode.y[0]]].toLocaleString()\
}\
@ -83,6 +88,7 @@ title: {\ @@ -83,6 +88,7 @@ title: {\
},\
label: {\
show: false,\
fontSize: 20,\
formatter: function (params) {\
return params.value[params.dimensionNames[params.encode.y[0]]].toLocaleString()\
}\
@ -306,17 +312,21 @@ title: {\ @@ -306,17 +312,21 @@ title: {\
tooltip: {},\
\
xAxis: [\
{ type: 'category', axisLabel:{rotate:30}}\
{ type: 'category', axisLabel:{rotate:30,fontSize: 20}}\
],\
yAxis: [{name:'', nameLocation:'middle', nameGap:40,id:0,axisLabel: {\
fontSize: 20,\
formatter: (value) => value.toLocaleString()\
}\
\
},\
\
}],\
\
series: [\
{ name:'Absolv. in der Regelstudienzeit',type: 'bar', encode:{x:'jahr',y:'absolv_in_rsz'},stack:'summe', color:'#004a93',\
label: {\
show: true,\
fontSize: 20,\
formatter: function (params) {\
return params.value[params.dimensionNames[params.encode.y[0]]].toLocaleString()\
}\
@ -324,6 +334,7 @@ title: {\ @@ -324,6 +334,7 @@ title: {\
{ name:'Absolv. über der Regelstudienzeit',type: 'bar',encode:{x:'jahr',y:'absolv_ueber_rsz'},stack:'summe', color:'#afcde4',\
label: {\
show: true,\
fontSize: 20,\
formatter: function (params) {\
return params.value[params.dimensionNames[params.encode.y[0]]].toLocaleString()\
}\
@ -594,6 +605,56 @@ title: {\ @@ -594,6 +605,56 @@ title: {\
{"name":"y","vizPropertyVariablename":"y","propertyValue":"summe","propUnit":""},\
{"name":"text","vizPropertyVariablename":"text","propertyValue":"summe","propUnit":""}],\
"dataTransformation":[]}^ ^1^600^400^200^100^0^^^^^^^^
324^echarts_line_y_sxc_stud_anteilfs1^Anteil der Studienanfänger_innen (Hochschulvergleich)^ ^{"version":"0.2b","id":1,"name":"","renderer":"echarts","dataSources":[{"value":"0","nr":1,"name":"Tab. 1","isDefault":true}],\
"targetDiv":"","chartElements":[{"elemID":1,"vizTypeUniquename":"echarts_line_y","caption":"echarts_line_y","datasource":"0","elementTypeProperties":[{"nr":1,"vizTypePropertyUniquename":"x","caption":"X-Achse","propertyValue":"sem_rueck_beur_ein_str","propertyType":"string"},\
{"nr":1,"vizTypePropertyUniquename":"y","caption":"Y-Achse","propertyValue":"anteil","propertyType":"string"}]},\
{"elemID":2,"vizTypeUniquename":"echarts_line_y","caption":"echarts_line_y","datasource":"0","elementTypeProperties":[{"nr":2,"vizTypePropertyUniquename":"x","caption":"X-Achse","propertyValue":"sem_rueck_beur_ein_str","propertyType":"string"},\
{"nr":2,"vizTypePropertyUniquename":"y","caption":"Y-Achse","propertyValue":"sxc_stud_anteil_anf_vergleich1","propertyType":"string"}]},\
{"elemID":3,"vizTypeUniquename":"echarts_line_y","caption":"echarts_line_y","datasource":"0","elementTypeProperties":[{"nr":3,"vizTypePropertyUniquename":"x","caption":"X-Achse","propertyValue":"sem_rueck_beur_ein_str","propertyType":"string"},\
{"nr":3,"vizTypePropertyUniquename":"y","caption":"Y-Achse","propertyValue":"sxc_stud_anteil_anf_vergleich2","propertyType":"string"}]}],\
"chartPropertiesUsed":[{"name":"caption","vizPropertyVariablename":"caption","propertyValue":"Anteil der Studienanfänger_innen (Hochschulvergleich)"},\
{"name":"x","vizPropertyVariablename":"x","propertyValue":"sem_rueck_beur_ein_str","propUnit":""},\
{"name":"x","vizPropertyVariablename":"x","propertyValue":"sem_rueck_beur_ein_str","propUnit":""},\
{"name":"y","vizPropertyVariablename":"y","propertyValue":"anteil","propUnit":""},\
{"name":"y","vizPropertyVariablename":"y","propertyValue":"anteil","propUnit":""},\
{"name":"title.left","vizPropertyVariablename":"title.left","propertyValue":"left","propUnit":""},\
{"name":"title.top","vizPropertyVariablename":"title.top","propertyValue":"top","propUnit":""},\
{"name":"legendShow","vizPropertyVariablename":"legendShow","propertyValue":"true","propUnit":""},\
{"name":"legend.top","vizPropertyVariablename":"legend.top","propertyValue":"bottom","propUnit":""},\
{"name":"legend.left","vizPropertyVariablename":"legend.left","propertyValue":"left","propUnit":""},\
{"name":"legend.scroll","vizPropertyVariablename":"legend.scroll","propertyValue":"false","propUnit":""},\
{"name":"margin.left","vizPropertyVariablename":"margin.left","propertyValue":"20","propUnit":"%"},\
{"name":"margin.right","vizPropertyVariablename":"margin.right","propertyValue":"0","propUnit":"%"},\
{"name":"margin.top","vizPropertyVariablename":"margin.top","propertyValue":"16","propUnit":"%"},\
{"name":"margin.bottom","vizPropertyVariablename":"margin.bottom","propertyValue":"20","propUnit":"%"},\
{"name":"xAxisNameLocation","vizPropertyVariablename":"xAxisNameLocation","propertyValue":"end","propUnit":""},\
{"name":"tickRotate_x","vizPropertyVariablename":"tickRotate_x","propertyValue":"30","propUnit":""},\
{"name":"width_x","vizPropertyVariablename":"width_x","propertyValue":"100","propUnit":"px"},\
{"name":"padding_x","vizPropertyVariablename":"padding_x","propertyValue":"5","propUnit":""},\
{"name":"padding_y","vizPropertyVariablename":"padding_y","propertyValue":"5","propUnit":""},\
{"name":"width_y","vizPropertyVariablename":"width_y","propertyValue":"50","propUnit":"px"},\
{"name":"position_y","vizPropertyVariablename":"position_y","propertyValue":"center","propUnit":""},\
{"name":"valueLabelShow","vizPropertyVariablename":"valueLabelShow","propertyValue":"false","propUnit":""},\
{"name":"distance_valueLabel","vizPropertyVariablename":"distance_valueLabel","propertyValue":"10","propUnit":""},\
{"name":"position_valueLabel","vizPropertyVariablename":"position_valueLabel","propertyValue":"inside","propUnit":""},\
{"name":"schemeArray","vizPropertyVariablename":"schemeArray","propertyValue":"D3_Tableau10","propUnit":""},\
{"name":"seriesColorBy","vizPropertyVariablename":"seriesColorBy","propertyValue":"series","propUnit":""},\
{"name":"barStacked","vizPropertyVariablename":"barStacked","propertyValue":"false","propUnit":""}],\
"dataTransformation":[]}^^^29.04.2026^29.04.2026^47140^^3^ ^^1^800^600^100^60^0^^^^^^^^
323^echarts_line_y_sxc_stud_sh1^Studienanfänger_innen 1. HS (Hochschulvergleich)^ ^{"version":"0.2b","id":1,"name":"","renderer":"echarts","dataSources":[{"value":"0","nr":1,"name":"Tab. 1","isDefault":true}],\
"targetDiv":"","chartElements":[{"elemID":1,"vizTypeUniquename":"echarts_line_y","caption":"echarts_line_y","datasource":"0","elementTypeProperties":[{"nr":1,"vizTypePropertyUniquename":"x","caption":"X-Achse","propertyValue":"sem_rueck_beur_ein_str","propertyType":"string"},\
{"nr":1,"vizTypePropertyUniquename":"y","caption":"Y-Achse","propertyValue":"summe_hs1","propertyType":"string"}]}],\
"chartPropertiesUsed":[{"name":"caption","vizPropertyVariablename":"caption","propertyValue":"Studienanfänger_innen 1. HS (Hochschulvergleich)"},\
{"name":"x","vizPropertyVariablename":"x","propertyValue":"sem_rueck_beur_ein_str","propUnit":""},\
{"name":"x","vizPropertyVariablename":"x","propertyValue":"sem_rueck_beur_ein_str","propUnit":""},\
{"name":"y","vizPropertyVariablename":"y","propertyValue":"summe_hs1","propUnit":""},\
{"name":"y","vizPropertyVariablename":"y","propertyValue":"summe_hs1","propUnit":""}],\
"dataTransformation":[]}^^^29.04.2026^29.04.2026^47140^^3^ ^^1^800^600^100^60^0^^^^^^^^
322^echarts_line_y_sxc_vergleich1^Studierende (Hochschulvergleich)^ ^{"version":"0.2b","id":1,"name":"","renderer":"echarts","dataSources":[{"value":"0","nr":1,"name":"Tab. 1","isDefault":true}],\
"targetDiv":"","chartElements":[{"elemID":1,"vizTypeUniquename":"echarts_line_y","caption":"echarts_line_y","datasource":"0","elementTypeProperties":[{"nr":1,"vizTypePropertyUniquename":"x","caption":"X-Achse","propertyValue":"sem_rueck_beur_ein_str","propertyType":"string"},\
{"nr":1,"vizTypePropertyUniquename":"y","caption":"Y-Achse","propertyValue":"summe","propertyType":"string"}]}],\
"chartPropertiesUsed":[{"name":"caption","vizPropertyVariablename":"caption","propertyValue":"Studierende / Studienanfänger_innen (Hochschulvergleich)"}],\
"dataTransformation":[]}^^^29.04.2026^29.04.2026^47140^^3^ ^^1^800^600^100^60^0^^^^^^^^
280^ERFOLG_BA_MA_SANKEY^Bachelor-Master Übergang Sankey Diagramm^ ^{"version":"0.2b","id":1,"name":"","renderer":"d3js","dataSources":[{"value":"0","nr":1,"name":"Tab. 1","isDefault":true}],"targetDiv":"","chartElements":[{"elemID":1,"vizTypeUniquename":"sankey","caption":"sankey","datasource":"0","elementTypeProperties":[{"nr":1,"vizTypePropertyUniquename":"dimension1","caption":"Dimension 1","propertyValue":"erfolg_ba_ma_uebergang_abschluss_vorher_abschluss_str","propertyType":"string"},{"nr":1,"vizTypePropertyUniquename":"dimension2","caption":"Dimension 2","propertyValue":"erfolg_ba_ma_uebergang_einschr_nachher_abschluss_str","propertyType":"string"},{"nr":1,"vizTypePropertyUniquename":"measure1","caption":"Maß 1","propertyValue":"erfolg_ba_ma_uebergang_summe","propertyType":"string"}]}],"chartPropertiesUsed":[{"name":"caption","vizPropertyVariablename":"caption","propertyValue":"Übergang Bachelor/Master (Flussdiagramm)"},{"name":"height","vizPropertyVariablename":"height","propertyValue":"450","propUnit":""},{"name":"width","vizPropertyVariablename":"width","propertyValue":"650","propUnit":""},{"name":"marginLeft","vizPropertyVariablename":"marginLeft","propertyValue":"100","propUnit":""},{"name":"null_value_mask","vizPropertyVariablename":"null_value_mask","propertyValue":"Kein Master","propUnit":""},{"name":"backgroundColor","vizPropertyVariablename":"backgroundColor","propertyValue":"#ffffff","propUnit":""},{"name":"color","vizPropertyVariablename":"color","propertyValue":"#000000","propUnit":""},{"name":"stroke_static","vizPropertyVariablename":"stroke_static","propertyValue":"#000000","propUnit":""},{"name":"fill_static","vizPropertyVariablename":"fill","propertyValue":"#000000","propUnit":""},{"name":"line_y","vizPropertyVariablename":"line","propertyValue":"true","propUnit":""},{"name":"line_x","vizPropertyVariablename":"line","propertyValue":"true","propUnit":""},{"name":"scale_x","vizPropertyVariablename":"type","propertyValue":"band","propUnit":""}],"dataTransformation":[]}^ ^^25.08.2024^25.08.2024^44160^ ^1^{"version":"0.2b","id":1,"name":"","renderer":"d3js","dataSources":[{"value":"0","nr":1,"name":"Tab. 1","isDefault":true}],"targetDiv":"","chartElements":[{"elemID":1,"vizTypeUniquename":"sankey","caption":"sankey","datasource":"0","elementTypeProperties":[{"nr":1,"vizTypePropertyUniquename":"dimension1","caption":"Dimension 1","propertyValue":"erfolg_ba_ma_uebergang_abschluss_vorher_abschluss_str","propertyType":"string"},{"nr":1,"vizTypePropertyUniquename":"dimension2","caption":"Dimension 2","propertyValue":"erfolg_ba_ma_uebergang_einschr_nachher_abschluss_str","propertyType":"string"},{"nr":1,"vizTypePropertyUniquename":"measure1","caption":"Maß 1","propertyValue":"erfolg_ba_ma_uebergang_summe","propertyType":"string"}]}],"chartPropertiesUsed":[{"name":"caption","vizPropertyVariablename":"caption","propertyValue":"Übergang Bachelor/Master (Flussdiagramm)"},{"name":"height","vizPropertyVariablename":"height","propertyValue":"450","propUnit":""},{"name":"width","vizPropertyVariablename":"width","propertyValue":"650","propUnit":""},{"name":"marginLeft","vizPropertyVariablename":"marginLeft","propertyValue":"100","propUnit":""},{"name":"null_value_mask","vizPropertyVariablename":"null_value_mask","propertyValue":"Kein Master","propUnit":""},{"name":"backgroundColor","vizPropertyVariablename":"backgroundColor","propertyValue":"#ffffff","propUnit":""},{"name":"color","vizPropertyVariablename":"color","propertyValue":"#000000","propUnit":""},{"name":"stroke_static","vizPropertyVariablename":"stroke_static","propertyValue":"#000000","propUnit":""},{"name":"fill_static","vizPropertyVariablename":"fill","propertyValue":"#000000","propUnit":""},{"name":"line_y","vizPropertyVariablename":"line","propertyValue":"true","propUnit":""},{"name":"line_x","vizPropertyVariablename":"line","propertyValue":"true","propUnit":""},{"name":"scale_x","vizPropertyVariablename":"type","propertyValue":"band","propUnit":""}],"dataTransformation":[]}^ ^1^600^400^200^100^0^^^^^^^^
281^STUD_ALTER_BOXPLOT_H^Studierende nach Alter Boxplot horizontal^ ^{"version":"0.2b","id":1,"name":"","renderer":"plot","dataSources":[{"value":"0","nr":1,"name":"Tab. 1","isDefault":true}],\
"targetDiv":"","chartElements":[{"elemID":1,"vizTypeUniquename":"box_x","caption":"box_x","datasource":"0","elementTypeProperties":[{"nr":1,"vizTypePropertyUniquename":"x","caption":"X-Achse","propertyValue":"alter","propertyType":"string"},\

11
src-modules/module/viz/schluesseltabellen/viz_colorscheme_fuellen.sql

@ -21,7 +21,9 @@ @@ -21,7 +21,9 @@
{"uniquename":"fak", "caption":"Fakultäten"},
{"uniquename":"quadroColor", "caption":"Vier Farben"},
{"uniquename":"blandLocalized", "caption":"Bundesland (eigenes)"},
{"uniquename":"colorGrades", "caption":"Blautöne"}
{"uniquename":"colorGrades", "caption":"Blautöne"},
{"uniquename":"in_rsz", "caption":"In oder über Regelstudienzeit"}
]
/>
@ -128,6 +130,13 @@ @@ -128,6 +130,13 @@
{"colorscheme":"colorGrades",
"colorcode":"#f6f7fc"}
,
{"colorscheme":"in_rsz",
"colorcode":"#004a93"},
{"colorscheme":"in_rsz",
"colorcode":"#afcde4"},
{"colorscheme":"in_rsz",
"colorcode":"##ccffff"}
]

131
src-modules/module/viz/schluesseltabellen/viz_dashboard_STUDABSOLV_fuellen.sql

@ -0,0 +1,131 @@ @@ -0,0 +1,131 @@
--Freemarker Template
<#include "SQL_lingua_franca"/>
<#include "SuperX_general"/>
<#include "VIZ-Makros"/>
<sqlvars>
</sqlvars>
<#assign viz_dashboard =
{ "caption":"im Überblick",
"uniquename":"STUDABSOLV",
"maskeninfo_id":44690,
"booklet_stylesheet":"viz_report_44690_xmlsource.jrxml",
"gridtitle_felderinfo_id":"null" }
/>
<#assign link_tablestylesheet="viz_html_chart_viewer_mask_and_table.xsl" />
<#assign open_modal_card_detail="0" />
<#assign viz_dashboard_tabs = [
{
"caption":"Studierende",
"maskeninfo_id":"44190",
"sortnr":10,
"select_clause":"sum(summe) as summe",
"fact_table":"sos_stg_aggr",
"where_clause":"studiengang_nr=1
and fach_nr=1
and stichtag=(select I.tid from sos_stichtag I where I.appl_key=''0'')",
"optional_filter_name":"",
"optional_filter_value":"",
"booklet_stylesheet":"viz_report_44190_xmlsource.jrxml"
},
{
"caption":"Studienanfänger*innen im 1. HS",
"maskeninfo_id":"44190",
"sortnr":20,
"select_clause":"sum(summe) as summe",
"fact_table":"sos_stg_aggr",
"where_clause":"studiengang_nr=1
and fach_nr=1
and stichtag=(select I.tid from sos_stichtag I where I.appl_key=''0'')
and hssem=1",
"optional_filter_name":"",
"optional_filter_value":"",
"booklet_stylesheet":"viz_report_44190_xmlsource.jrxml"
},
{
"caption":"Studienanfänger*innen im 1. FS",
"maskeninfo_id":"44190",
"sortnr":30,
"select_clause":"sum(summe) as summe",
"fact_table":"sos_stg_aggr",
"where_clause":"studiengang_nr=1
and fach_nr=1
and stichtag=(select I.tid from sos_stichtag I where I.appl_key=''0'')
and fach_sem_zahl=1",
"optional_filter_name":"",
"optional_filter_value":"",
"booklet_stylesheet":"viz_report_44190_xmlsource.jrxml"
}
]
/>
<#assign viz_dashboard_elements = [
{
"datasource_type":1,
"datasource":"2",
"sortnr":10,
"chart_uniquename":"STUD_SEM_LINE",
"caption":"Studierende gesamt",
"onclick_event":"",
"active":"1"
},
{
"datasource_type":1,
"datasource":"3",
"sortnr":20,
"chart_uniquename":"STUD_SEM_LINE",
"caption":"Studierende 1. Hochschulsemester",
"onclick_event":"",
"active":"1"
},
{
"datasource_type":1,
"datasource":"4",
"sortnr":30,
"chart_uniquename":"STUD_SEM_LINE",
"caption":"Studierende 1. Fachsemester",
"onclick_event":"",
"active":"1"
},
{
"datasource_type":1,
"datasource":"5",
"sortnr":40,
"chart_uniquename":"ABSOLV_SEM_LINE",
"caption":"Absolvent*innen (Zeitreihe)",
"onclick_event":"",
"active":"1"
},
{
"datasource_type":1,
"datasource":"6",
"sortnr":50,
"chart_uniquename":"ABSOLV_RSZ_SEM_BAR",
"caption":"Absolvent*innen in der Regelstudienzeit (Zeitreihe)",
"onclick_event":"",
"active":"1"
},
{
"datasource_type":1,
"datasource":"7",
"sortnr":60,
"chart_uniquename":"ABSOLV_ABGRP_SEM_AREA",
"caption":"Absolvent*innen nach Abschlussgruppe (Zeitreihe)",
"onclick_event":"",
"active":"1"
}
] />
<@create_temp_tables_dashboard />
<@viz_dashboard_fuellen />
<@drop_temp_tables_dashboard />

106
src-modules/module/viz/schluesseltabellen/viz_dashboard_STUD_fuellen.sql

@ -0,0 +1,106 @@ @@ -0,0 +1,106 @@
--Freemarker Template
<#include "SQL_lingua_franca"/>
<#include "SuperX_general"/>
<#include "VIZ-Makros"/>
<sqlvars>
</sqlvars>
<#assign viz_dashboard =
{ "caption":"im Überblick",
"uniquename":"STUD",
"maskeninfo_id":44660,
"booklet_stylesheet":"viz_report_44660_xmlsource.jrxml",
"gridtitle_felderinfo_id":"null" }
/>
<#assign link_tablestylesheet="viz_html_chart_viewer_mask_and_table.xsl" />
<#assign open_modal_card_detail="0" />
<#assign viz_dashboard_tabs = [
{
"caption":"Studierende",
"maskeninfo_id":"44190",
"sortnr":10,
"select_clause":"sum(summe) as summe",
"fact_table":"sos_stg_aggr",
"where_clause":"studiengang_nr=1
and fach_nr=1
and stichtag=(select I.tid from sos_stichtag I where I.appl_key=''0'')",
"optional_filter_name":"",
"optional_filter_value":"",
"booklet_stylesheet":"viz_report_44190_xmlsource.jrxml"
},
{
"caption":"Studienanfänger*innen im 1. HS",
"maskeninfo_id":"44190",
"sortnr":20,
"select_clause":"sum(summe) as summe",
"fact_table":"sos_stg_aggr",
"where_clause":"studiengang_nr=1
and fach_nr=1
and stichtag=(select I.tid from sos_stichtag I where I.appl_key=''0'')
and hssem=1",
"optional_filter_name":"",
"optional_filter_value":"",
"booklet_stylesheet":"viz_report_44190_xmlsource.jrxml"
},
{
"caption":"Studienanfänger*innen im 1. FS",
"maskeninfo_id":"44190",
"sortnr":30,
"select_clause":"sum(summe) as summe",
"fact_table":"sos_stg_aggr",
"where_clause":"studiengang_nr=1
and fach_nr=1
and stichtag=(select I.tid from sos_stichtag I where I.appl_key=''0'')
and fach_sem_zahl=1",
"optional_filter_name":"",
"optional_filter_value":"",
"booklet_stylesheet":"viz_report_44190_xmlsource.jrxml"
}
]
/>
<#assign viz_dashboard_elements = [
{
"datasource_type":1,
"datasource":"2",
"sortnr":10,
"chart_uniquename":"STUD_SEM_LINE",
"caption":"Studierende gesamt",
"onclick_event":"",
"active":"1"
},
{
"datasource_type":1,
"datasource":"3",
"sortnr":20,
"chart_uniquename":"STUD_SEM_LINE",
"caption":"Studierende 1. Hochschulsemester",
"onclick_event":"",
"active":"1"
},
{
"datasource_type":1,
"datasource":"4",
"sortnr":30,
"chart_uniquename":"STUD_SEM_LINE",
"caption":"Studierende 1. Fachsemester",
"onclick_event":"",
"active":"1"
}
] />
<@create_temp_tables_dashboard />
<@viz_dashboard_fuellen />
<@drop_temp_tables_dashboard />

250
src-modules/module/viz/schluesseltabellen/viz_dashboard_element_fuellen.sql

@ -0,0 +1,250 @@ @@ -0,0 +1,250 @@
--Freemarker Template
<#include "SQL_lingua_franca"/>
<#include "SuperX_general"/>
<#include "VIZ-Makros"/>
<sqlvars>
<sqlvar name="renderer">
select tid from viz_renderer where uniquename='viz';
</sqlvar>
</sqlvars>
<#assign viz_properties = [
{ "caption":"Dimensionen",
"prop_uniquename":"dimensionsNode",
"explanation":"Dimensionen",
"prop_default":"",
"prop_unit":"",
"is_generic":"0",
"static_values":"",
"is_mandatory":"0",
"input_type_uniquename":"NODE",
"sortnr":"1",
"range_from":"",
"range_to":"",
"prop_value_type":"NODE",
"parent_property_uniquename":"",
"variableName":"encode"
},
{ "caption":"Zeilendimension 1",
"prop_uniquename":"rowdim1",
"explanation":"Zeilendimension oberste Ebene für Kreuztabellen",
"prop_default":"",
"prop_unit":"",
"is_generic":"0",
"static_values":"",
"is_mandatory":"1",
"input_type_uniquename":"SELECT",
"property_group_uniquename":"CATEGORY",
"sortnr":"608",
"range_from":"",
"range_to":"",
"prop_value_type":"string",
"parent_property_uniquename":"dimensionsNode"
},
{ "caption":"Spaltendimension 1",
"prop_uniquename":"coldim1",
"explanation":"Spaltendimension obersete Ebene für Kreuztabellen",
"prop_default":"",
"prop_unit":"",
"is_generic":"0",
"static_values":"",
"is_mandatory":"1",
"input_type_uniquename":"SELECT",
"property_group_uniquename":"CATEGORY",
"sortnr":"610",
"range_from":"",
"range_to":"",
"prop_value_type":"string",
"parent_property_uniquename":"dimensionsNode"
},
{ "caption":"Dimension 1",
"prop_uniquename":"dimension1",
"explanation":"Dimension 1",
"prop_default":"",
"prop_unit":"",
"is_generic":"0",
"static_values":"",
"is_mandatory":"1",
"input_type_uniquename":"SELECT",
"property_group_uniquename":"CATEGORY",
"sortnr":"608",
"range_from":"",
"range_to":"",
"prop_value_type":"string",
"parent_property_uniquename":"dimensionsNode"
},
{ "caption":"Maß 1",
"prop_uniquename":"measure1",
"explanation":"Maß 1",
"prop_default":"",
"prop_unit":"",
"is_generic":"0",
"static_values":"",
"is_mandatory":"1",
"input_type_uniquename":"SELECT",
"property_group_uniquename":"MEASURE",
"sortnr":"610",
"range_from":"",
"range_to":"",
"prop_value_type":"string",
"parent_property_uniquename":"dimensionsNode"
},
{ "caption":"Titel",
"prop_uniquename":"titleNode",
"explanation":"Titel-Element",
"prop_default":"",
"prop_unit":"",
"is_generic":"1",
"static_values":"",
"is_mandatory":"0",
"input_type_uniquename":"NODE",
"sortnr":"1",
"range_from":"",
"range_to":"",
"prop_value_type":"NODE",
"parent_property_uniquename":"",
"variableName":"subtitle"
},
{ "caption":"Untertitel-Text",
"prop_uniquename":"subtitle",
"explanation":"Text",
"prop_default":"",
"prop_unit":"",
"is_generic":"1",
"static_values":"",
"is_mandatory":"0",
"input_type_uniquename":"TEXT",
"property_group_uniquename":"",
"sortnr":"10",
"range_from":"",
"range_to":"",
"prop_value_type":"STRING",
"parent_property_uniquename":"titleNode"
},
{ "caption":"Untertitel CSS-Klasse",
"prop_uniquename":"subtitleCssClass",
"explanation":"Formatierung mit CSS-Klasse",
"prop_default":"",
"prop_unit":"",
"is_generic":"1",
"static_values":"",
"is_mandatory":"0",
"input_type_uniquename":"TEXT",
"property_group_uniquename":"STYLE",
"sortnr":"10",
"range_from":"",
"range_to":"",
"prop_value_type":"STRING",
"parent_property_uniquename":"titleNode"
},
{ "caption":"CSS-Klassen",
"prop_uniquename":"CssClassesNode",
"explanation":"",
"prop_default":"",
"prop_unit":"",
"is_generic":"1",
"static_values":"",
"is_mandatory":"0",
"input_type_uniquename":"NODE",
"property_group_uniquename":"",
"sortnr":"10",
"range_from":"",
"range_to":"",
"prop_value_type":"NODE",
"parent_property_uniquename":"",
"variableName":"CssClassesNode"
},
{ "caption":"Tabelle CSS-Klasse",
"prop_uniquename":"tableCssClass",
"explanation":"Formatierung mit CSS-Klasse",
"prop_default":"table",
"prop_unit":"",
"is_generic":"1",
"static_values":"",
"is_mandatory":"0",
"input_type_uniquename":"TEXT",
"property_group_uniquename":"STYLE",
"sortnr":"10",
"range_from":"",
"range_to":"",
"prop_value_type":"STRING",
"parent_property_uniquename":"CssClassesNode"
},
{ "caption":"Tabellenheader CSS-Klasse",
"prop_uniquename":"theadCssClass",
"explanation":"Formatierung mit CSS-Klasse",
"prop_default":"",
"prop_unit":"",
"is_generic":"1",
"static_values":"",
"is_mandatory":"0",
"input_type_uniquename":"TEXT",
"property_group_uniquename":"STYLE",
"sortnr":"10",
"range_from":"",
"range_to":"",
"prop_value_type":"STRING",
"parent_property_uniquename":"CssClassesNode"
},
{ "caption":"Spaltenüberschrift CSS-Klasse",
"prop_uniquename":"thCssClass",
"explanation":"Formatierung mit CSS-Klasse",
"prop_default":"",
"prop_unit":"",
"is_generic":"1",
"static_values":"",
"is_mandatory":"0",
"input_type_uniquename":"TEXT",
"property_group_uniquename":"STYLE",
"sortnr":"10",
"range_from":"",
"range_to":"",
"prop_value_type":"STRING",
"parent_property_uniquename":"CssClassesNode"
},
{ "caption":"Daten-Zellen CSS-Klasse",
"prop_uniquename":"tdDataCssClass",
"explanation":"Formatierung mit CSS-Klasse",
"prop_default":"",
"prop_unit":"",
"is_generic":"1",
"static_values":"",
"is_mandatory":"0",
"input_type_uniquename":"TEXT",
"property_group_uniquename":"STYLE",
"sortnr":"10",
"range_from":"",
"range_to":"",
"prop_value_type":"STRING",
"parent_property_uniquename":"CssClassesNode"
},
{ "caption":"Tabellenfooter CSS-Klasse",
"prop_uniquename":"tfootCssClass",
"explanation":"Formatierung mit CSS-Klasse",
"prop_default":"",
"prop_unit":"",
"is_generic":"1",
"static_values":"",
"is_mandatory":"0",
"input_type_uniquename":"TEXT",
"property_group_uniquename":"STYLE",
"sortnr":"10",
"range_from":"",
"range_to":"",
"prop_value_type":"STRING",
"parent_property_uniquename":"CssClassesNode"
}
]
/>
<@create_temp_tables />
<@fill_viz_properties />
<@drop_temp_tables />

250
src-modules/module/viz/schluesseltabellen/viz_properties_basistools_fuellen.sql

@ -0,0 +1,250 @@ @@ -0,0 +1,250 @@
--Freemarker Template
<#include "SQL_lingua_franca"/>
<#include "SuperX_general"/>
<#include "VIZ-Makros"/>
<sqlvars>
<sqlvar name="renderer">
select tid from viz_renderer where uniquename='viz';
</sqlvar>
</sqlvars>
<#assign viz_properties = [
{ "caption":"Dimensionen",
"prop_uniquename":"dimensionsNode",
"explanation":"Dimensionen",
"prop_default":"",
"prop_unit":"",
"is_generic":"0",
"static_values":"",
"is_mandatory":"0",
"input_type_uniquename":"NODE",
"sortnr":"1",
"range_from":"",
"range_to":"",
"prop_value_type":"NODE",
"parent_property_uniquename":"",
"variableName":"encode"
},
{ "caption":"Zeilendimension 1",
"prop_uniquename":"rowdim1",
"explanation":"Zeilendimension oberste Ebene für Kreuztabellen",
"prop_default":"",
"prop_unit":"",
"is_generic":"0",
"static_values":"",
"is_mandatory":"1",
"input_type_uniquename":"SELECT",
"property_group_uniquename":"CATEGORY",
"sortnr":"608",
"range_from":"",
"range_to":"",
"prop_value_type":"string",
"parent_property_uniquename":"dimensionsNode"
},
{ "caption":"Spaltendimension 1",
"prop_uniquename":"coldim1",
"explanation":"Spaltendimension obersete Ebene für Kreuztabellen",
"prop_default":"",
"prop_unit":"",
"is_generic":"0",
"static_values":"",
"is_mandatory":"1",
"input_type_uniquename":"SELECT",
"property_group_uniquename":"CATEGORY",
"sortnr":"610",
"range_from":"",
"range_to":"",
"prop_value_type":"string",
"parent_property_uniquename":"dimensionsNode"
},
{ "caption":"Dimension 1",
"prop_uniquename":"dimension1",
"explanation":"Dimension 1",
"prop_default":"",
"prop_unit":"",
"is_generic":"0",
"static_values":"",
"is_mandatory":"1",
"input_type_uniquename":"SELECT",
"property_group_uniquename":"CATEGORY",
"sortnr":"608",
"range_from":"",
"range_to":"",
"prop_value_type":"string",
"parent_property_uniquename":"dimensionsNode"
},
{ "caption":"Maß 1",
"prop_uniquename":"measure1",
"explanation":"Maß 1",
"prop_default":"",
"prop_unit":"",
"is_generic":"0",
"static_values":"",
"is_mandatory":"1",
"input_type_uniquename":"SELECT",
"property_group_uniquename":"MEASURE",
"sortnr":"610",
"range_from":"",
"range_to":"",
"prop_value_type":"string",
"parent_property_uniquename":"dimensionsNode"
},
{ "caption":"Titel",
"prop_uniquename":"titleNode",
"explanation":"Titel-Element",
"prop_default":"",
"prop_unit":"",
"is_generic":"1",
"static_values":"",
"is_mandatory":"0",
"input_type_uniquename":"NODE",
"sortnr":"1",
"range_from":"",
"range_to":"",
"prop_value_type":"NODE",
"parent_property_uniquename":"",
"variableName":"subtitle"
},
{ "caption":"Untertitel-Text",
"prop_uniquename":"subtitle",
"explanation":"Text",
"prop_default":"",
"prop_unit":"",
"is_generic":"1",
"static_values":"",
"is_mandatory":"0",
"input_type_uniquename":"TEXT",
"property_group_uniquename":"",
"sortnr":"10",
"range_from":"",
"range_to":"",
"prop_value_type":"STRING",
"parent_property_uniquename":"titleNode"
},
{ "caption":"Untertitel CSS-Klasse",
"prop_uniquename":"subtitleCssClass",
"explanation":"Formatierung mit CSS-Klasse",
"prop_default":"",
"prop_unit":"",
"is_generic":"1",
"static_values":"",
"is_mandatory":"0",
"input_type_uniquename":"TEXT",
"property_group_uniquename":"STYLE",
"sortnr":"10",
"range_from":"",
"range_to":"",
"prop_value_type":"STRING",
"parent_property_uniquename":"titleNode"
},
{ "caption":"CSS-Klassen",
"prop_uniquename":"CssClassesNode",
"explanation":"",
"prop_default":"",
"prop_unit":"",
"is_generic":"1",
"static_values":"",
"is_mandatory":"0",
"input_type_uniquename":"NODE",
"property_group_uniquename":"",
"sortnr":"10",
"range_from":"",
"range_to":"",
"prop_value_type":"NODE",
"parent_property_uniquename":"",
"variableName":"CssClassesNode"
},
{ "caption":"Tabelle CSS-Klasse",
"prop_uniquename":"tableCssClass",
"explanation":"Formatierung mit CSS-Klasse",
"prop_default":"table",
"prop_unit":"",
"is_generic":"1",
"static_values":"",
"is_mandatory":"0",
"input_type_uniquename":"TEXT",
"property_group_uniquename":"STYLE",
"sortnr":"10",
"range_from":"",
"range_to":"",
"prop_value_type":"STRING",
"parent_property_uniquename":"CssClassesNode"
},
{ "caption":"Tabellenheader CSS-Klasse",
"prop_uniquename":"theadCssClass",
"explanation":"Formatierung mit CSS-Klasse",
"prop_default":"",
"prop_unit":"",
"is_generic":"1",
"static_values":"",
"is_mandatory":"0",
"input_type_uniquename":"TEXT",
"property_group_uniquename":"STYLE",
"sortnr":"10",
"range_from":"",
"range_to":"",
"prop_value_type":"STRING",
"parent_property_uniquename":"CssClassesNode"
},
{ "caption":"Spaltenüberschrift CSS-Klasse",
"prop_uniquename":"thCssClass",
"explanation":"Formatierung mit CSS-Klasse",
"prop_default":"",
"prop_unit":"",
"is_generic":"1",
"static_values":"",
"is_mandatory":"0",
"input_type_uniquename":"TEXT",
"property_group_uniquename":"STYLE",
"sortnr":"10",
"range_from":"",
"range_to":"",
"prop_value_type":"STRING",
"parent_property_uniquename":"CssClassesNode"
},
{ "caption":"Daten-Zellen CSS-Klasse",
"prop_uniquename":"tdDataCssClass",
"explanation":"Formatierung mit CSS-Klasse",
"prop_default":"",
"prop_unit":"",
"is_generic":"1",
"static_values":"",
"is_mandatory":"0",
"input_type_uniquename":"TEXT",
"property_group_uniquename":"STYLE",
"sortnr":"10",
"range_from":"",
"range_to":"",
"prop_value_type":"STRING",
"parent_property_uniquename":"CssClassesNode"
},
{ "caption":"Tabellenfooter CSS-Klasse",
"prop_uniquename":"tfootCssClass",
"explanation":"Formatierung mit CSS-Klasse",
"prop_default":"",
"prop_unit":"",
"is_generic":"1",
"static_values":"",
"is_mandatory":"0",
"input_type_uniquename":"TEXT",
"property_group_uniquename":"STYLE",
"sortnr":"10",
"range_from":"",
"range_to":"",
"prop_value_type":"STRING",
"parent_property_uniquename":"CssClassesNode"
}
]
/>
<@create_temp_tables />
<@fill_viz_properties />
<@drop_temp_tables />

58
src-modules/module/viz/schluesseltabellen/viz_properties_viz_basistools_crosstab_fuellen.sql

@ -0,0 +1,58 @@ @@ -0,0 +1,58 @@
--Freemarker Template
<#include "SQL_lingua_franca"/>
<#include "SuperX_general"/>
<#include "VIZ-Makros"/>
<sqlvars>
<sqlvar name="renderer">
select tid from viz_renderer where uniquename='viz';
</sqlvar>
</sqlvars>
<#assign viz_types = [
{"uniquename":"simplePivotTable", "caption":"Einfache pivotierte Tabelle",
"orientation":"Z",
"description":"Einfache pivotierte Datentabelle",
"explanation":""}
]
/>
<#assign viz_type_properties = [
{"viz_property_uniquename":"rowdim1",
"is_mandatory":"0"},
{"viz_property_uniquename":"coldim1",
"is_mandatory":"1"},
{"viz_property_uniquename":"measure1",
"is_mandatory":"1"},
{"viz_property_uniquename":"subtitle",
"is_mandatory":"0"},
{"viz_property_uniquename":"subtitleCssClass",
"is_mandatory":"0"},
{"viz_property_uniquename":"tableCssClass",
"is_mandatory":"0"},
{"viz_property_uniquename":"theadCssClass",
"is_mandatory":"0"},
{"viz_property_uniquename":"thCssClass",
"is_mandatory":"0"},
{"viz_property_uniquename":"tdDataCssClass",
"is_mandatory":"0"},
{"viz_property_uniquename":"tfootCssClass",
"is_mandatory":"0"}
]
/>
<@create_temp_tables />
<#foreach viz_type in viz_types>
<@fill_viz_types viz_type_p=viz_type />
<@fill_viz_type_properties viz_type_p=viz_type />
</#foreach>
<@drop_temp_tables />

54
src-modules/module/viz/schluesseltabellen/viz_properties_viz_basistools_simple_table_fuellen.sql

@ -0,0 +1,54 @@ @@ -0,0 +1,54 @@
--Freemarker Template
<#include "SQL_lingua_franca"/>
<#include "SuperX_general"/>
<#include "VIZ-Makros"/>
<sqlvars>
<sqlvar name="renderer">
select tid from viz_renderer where uniquename='viz';
</sqlvar>
</sqlvars>
<#assign viz_types = [
{"uniquename":"simpleTable", "caption":"Einfache Datentabelle",
"orientation":"Z",
"description":"Einfache Kopie der Datentabelle",
"explanation":""}
]
/>
<#assign viz_type_properties = [
{"viz_property_uniquename":"subtitle",
"is_mandatory":"0"},
{"viz_property_uniquename":"subtitleCssClass",
"is_mandatory":"0"},
{"viz_property_uniquename":"tableCssClass",
"is_mandatory":"0"},
{"viz_property_uniquename":"theadCssClass",
"is_mandatory":"0"},
{"viz_property_uniquename":"thCssClass",
"is_mandatory":"0"},
{"viz_property_uniquename":"tdDataCssClass",
"is_mandatory":"0"},
{"viz_property_uniquename":"tfootCssClass",
"is_mandatory":"0"}
]
/>
<@create_temp_tables />
<#foreach viz_type in viz_types>
<@fill_viz_types viz_type_p=viz_type />
<@fill_viz_type_properties viz_type_p=viz_type />
</#foreach>
<@drop_temp_tables />

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

@ -1,3 +1,4 @@ @@ -1,3 +1,4 @@
1^d3js^D3JS (V7)^
2^plot^Observable Plot^
3^echarts^Apache Echarts^
4^viz^VIZ Basistools^

231
superx/xml/js/viz/viz_viewer.js

@ -486,6 +486,9 @@ function renderChartSVGFromModel(currentChartModel,targetDiv,ergebniselementOrdn @@ -486,6 +486,9 @@ function renderChartSVGFromModel(currentChartModel,targetDiv,ergebniselementOrdn
case "echarts":
renderEChart2(currentChartModel,targetDiv,ergebniselementOrdnr,title);
break;
case "viz":
renderVizBaseTools(currentChartModel,targetDiv,ergebniselementOrdnr,title);
break;
default:
alert("No renderer");
break;
@ -1622,6 +1625,141 @@ function renderEChart2(currentChartModel,chartDiv,ergebniselementOrdnr,chartTitl @@ -1622,6 +1625,141 @@ function renderEChart2(currentChartModel,chartDiv,ergebniselementOrdnr,chartTitl
}
}
function renderVizBaseTools(currentChartModel,chartDiv,ergebniselementOrdnr,chartTitle)
{
var chartType=currentChartModel.chartElements[0].vizTypeUniquename;
var titleText=chartTitle;
if(chartTitle=="")
titleText=getChartPropertyValue(currentChartModel.chartPropertiesUsed,"caption");
//first empty the element, if necessary:
var chartDivElem=document.getElementById(chartDiv);
while (chartDivElem.firstChild) {
chartDivElem.removeChild(chartDivElem.firstChild);
}
switch (chartType)
{
case "simpleTable":
var zs=vizBaseToolSimpleTable(currentChartModel,rs[ergebniselementOrdnr],rsColumnMetaData[ergebniselementOrdnr],rs[ergebniselementOrdnr].length,titleText);
break;
case "simplePivotTable":
var rowdim1Prop=currentChartModel.chartElements[0].elementTypeProperties.find(o => o.vizTypePropertyUniquename == "rowdim1");
var rowdim1 =rowdim1Prop?rowdim1Prop.propertyValue:null;
var coldim1Prop=currentChartModel.chartElements[0].elementTypeProperties.find(o => o.vizTypePropertyUniquename == "coldim1");
var coldim1 =coldim1Prop?coldim1Prop.propertyValue:null;
var measure1Prop=currentChartModel.chartElements[0].elementTypeProperties.find(o => o.vizTypePropertyUniquename == "measure1");
var measure1 =measure1Prop?measure1Prop.propertyValue:null;
//TODO: rowdim2, coldim2 etc.
var tableArray=generateCrosstab(rs[ergebniselementOrdnr],rsColumnMetaData[ergebniselementOrdnr],rowdim1,coldim1,measure1);
zs=vizBaseToolArray2Table(currentChartModel,tableArray,tableArray.length,titleText)
//zs=JSON.stringify(tableArray);
break;
default:
zs="Unknown VIZ type";
break;
}
chartDivElem.innerHTML=zs;
}
function vizBaseToolSimpleTable(currentChartModel,mydata,metadata,rowcount,titleText)
{
var tableClass=getCssClassAttr(currentChartModel,"tableCssClass");
var theadCssClass=getCssClassAttr(currentChartModel,"theadCssClass");
var thCssClass=getCssClassAttr(currentChartModel,"thCssClass");
var tdDataCssClass=getCssClassAttr(currentChartModel,"tdDataCssClass");
var tfootCssClass=getCssClassAttr(currentChartModel,"tfootCssClass");
zs=vizBaseToolTableHead(titleText,tableClass,theadCssClass);
zs+="<tr>";
for(var col=0;col < metadata.length;col++)
{
if(metadata[col].nr)
{
zs+="<th"+thCssClass+">"+metadata[col].colcaption+"</th>";
}
}
zs +="</tr></thead><tbody>";
for(row=0;row<rowcount;row++)
{
if(mydata[row])
{
zs+="<tr>";
for(var col=0;col < metadata.length;col++)
{
if(metadata[col].nr)
{
zs+="<td"+tdDataCssClass+">"+mydata[row][metadata[col].colname]+"</td>";
}
}
zs+="</tr>";
}
}
zs+="</tbody>";
//TODO:tfoot wenn Summenzeile da ist
zs+="</table>";
return zs;
}
function vizBaseToolTableHead(titleText,tableClass,theadCssClass)
{
var zs="<table"+tableClass+">";
zs+="<caption>"+titleText+"</caption>";
zs+="<thead"+theadCssClass+">";
return zs;
}
function vizBaseToolArray2Table(currentChartModel,mydata,rowcount,titleText)
{
var tableClass=getCssClassAttr(currentChartModel,"tableCssClass");
var theadCssClass=getCssClassAttr(currentChartModel,"theadCssClass");
var thCssClass=getCssClassAttr(currentChartModel,"thCssClass");
var tdDataCssClass=getCssClassAttr(currentChartModel,"tdDataCssClass");
var tfootCssClass=getCssClassAttr(currentChartModel,"tfootCssClass");
zs=vizBaseToolTableHead(titleText,tableClass,theadCssClass);
zs+="<tr>";
for(var col=0;col < mydata[0].length;col++)
{
if(mydata[0][col])
{
zs+="<th"+thCssClass+">"+mydata[0][col]+"</th>";
}
}
zs +="</tr></thead><tbody>";
for(row=1;row<rowcount;row++)
{
if(mydata[row])
{
zs+="<tr>";
for(var col=0;col < mydata[row].length;col++)
{
if(mydata[row][col])
{
zs+="<td"+tdDataCssClass+">"+mydata[row][col]+"</td>";
}
}
zs+="</tr>";
}
}
zs+="</tbody></table>";
return zs;
}
function getCssClassAttr(currentChartModel,cssClassName)
{
var ret="";
var propval=getChartPropertyValue(currentChartModel.chartPropertiesUsed,cssClassName);
if(propval!="")
{
ret=" class=\""+propval+"\"";
}
return ret;
}
/*
function determineChartSkeleton(datasourceDef,ergebniselementOrdnr)
{
@ -1758,7 +1896,7 @@ var seriesArray=getEchartSeriesArray(currentChartModel,chartType,orientation,dim @@ -1758,7 +1896,7 @@ var seriesArray=getEchartSeriesArray(currentChartModel,chartType,orientation,dim
axisLabel: {
inside: false,
margin: getChartPropertyValue(currentChartModel.chartPropertiesUsed,"padding_x"),
fontSize: 12,
fontSize: "1.5em",
width:getChartPropertyValue(currentChartModel.chartPropertiesUsed,"width_x"),
rotate: getChartPropertyValue(currentChartModel.chartPropertiesUsed,"tickRotate_x"),
/*formatter: function (value, index) {
@ -1774,7 +1912,7 @@ var seriesArray=getEchartSeriesArray(currentChartModel,chartType,orientation,dim @@ -1774,7 +1912,7 @@ var seriesArray=getEchartSeriesArray(currentChartModel,chartType,orientation,dim
axisLabel: {
inside: false,
margin: getChartPropertyValue(currentChartModel.chartPropertiesUsed,"padding_y"),
fontSize: 12,
fontSize: "2em",
width:getChartPropertyValue(currentChartModel.chartPropertiesUsed,"width_y"),
rotate: getChartPropertyValue(currentChartModel.chartPropertiesUsed,"tickRotate_y"),
distance:getChartPropertyValue(currentChartModel.chartPropertiesUsed,"distance_y"),
@ -1815,7 +1953,7 @@ function getEchartSeriesArray(currentChartModel,chartType,orientation,dimension1 @@ -1815,7 +1953,7 @@ function getEchartSeriesArray(currentChartModel,chartType,orientation,dimension1
color: '#dfe4f2'
},
margin: 50,
fontSize: 14,
fontSize: "2em",
colorBy: getChartPropertyValue(currentChartModel.chartPropertiesUsed,"seriesColorBy"),//'series',// 'data',
//color: myPalette,
lineStyle: {
@ -1824,7 +1962,7 @@ function getEchartSeriesArray(currentChartModel,chartType,orientation,dimension1 @@ -1824,7 +1962,7 @@ function getEchartSeriesArray(currentChartModel,chartType,orientation,dimension1
label: {
show: (getChartPropertyValue(currentChartModel.chartPropertiesUsed,"valueLabelShow")=="false")?false:true, //true
fontWeight:'bolder',
fontSize: 14,
fontSize: "2em",
distance:30,
//offset:[30, 40],
// position:"bottom",
@ -1953,7 +2091,7 @@ var option = { @@ -1953,7 +2091,7 @@ var option = {
axisLabel: {
inside: false,
margin: getChartPropertyValue(currentChartModel.chartPropertiesUsed,"padding_x"),
fontSize: 12,
fontSize: "1.5em",
width:getChartPropertyValue(currentChartModel.chartPropertiesUsed,"width_x"),
rotate: getChartPropertyValue(currentChartModel.chartPropertiesUsed,"tickRotate_x"),
/*formatter: function (value, index) {
@ -1970,7 +2108,7 @@ var option = { @@ -1970,7 +2108,7 @@ var option = {
axisLabel: {
inside: false,
margin: getChartPropertyValue(currentChartModel.chartPropertiesUsed,"padding_y"),
fontSize: 12,
fontSize: "1.5em",
width:getChartPropertyValue(currentChartModel.chartPropertiesUsed,"width_y"),
rotate: getChartPropertyValue(currentChartModel.chartPropertiesUsed,"tickRotate_y"),
distance:getChartPropertyValue(currentChartModel.chartPropertiesUsed,"distance_y"),
@ -3005,6 +3143,87 @@ function pivotTable(rsData,rsMetaData,srcColNrStart) @@ -3005,6 +3143,87 @@ function pivotTable(rsData,rsMetaData,srcColNrStart)
console.log(rsDataPivot);
*/
return rsDataPivot;
}
function generateCrosstab(rsData,rsMetaData,rowdim1,coldim1,measure1)
{
/*erzeugt einen Array als Kreuztabelle
TODO: rowdim1 auswerten, derzeit noch nicht impl.*/
var rsDataPivot=new Array();
var nrSourceRows=rsData.length;
var nrSouceCols=rsMetaData.length;
var rsRow=new Array();
var zs="";
var targetRownr=0;
var rowdim1Prop=rsMetaData.find(obj => obj.colname == rowdim1);
var rowdim1Nr =rowdim1Prop?rowdim1Prop.nr:null;
var coldim1Prop=rsMetaData.find(obj => obj.colname == coldim1);
var coldim1Nr =coldim1Prop?coldim1Prop.nr:null;
var measure1Prop=rsMetaData.find(obj => obj.colname == measure1);
var measure1Nr =measure1Prop?measure1Prop.nr:null;
var coldim1Caption=rsMetaData.find(obj => obj.colname == coldim1).colcaption;
//first line will have headers:
var rownr=0;
//Variable zs ist nur zum Debuggen
zs+=coldim1Caption+"|";
rsRow[rownr]=coldim1Caption; //TODO: rowdim1
rownr++;
rsData.forEach((row) => {
var colnr=0;
for (var col in row) {
if(colnr==coldim1Nr)
{
zs+=row[col]+"|";
rsRow[rownr]=row[col];
}
colnr++;
}
rownr++;
}
);
zs +="\n";
targetRownr++;
rsDataPivot.push(rsRow);
//now the data:
var metaDataColnr=0;
rsMetaData.forEach((col) => {
if(metaDataColnr==measure1Nr && col.colcaption.trim()!="")
{
//start a new row:
var rsRow=new Array();
var colname=col.colname;
zs+=col.colcaption +"|";
rsRow[0]=col.colcaption;
var targetColnr=1;
var rownr=0;
rsData.forEach((row) => {
var colnr=0;
for (var col in row) {
if(colnr==metaDataColnr)
{
zs+=row[col]+"|";
rsRow[targetColnr]=row[col];
targetColnr++;
}
colnr++;
};
rownr++;
});
zs+="\n";
rsDataPivot.push(rsRow);
}
metaDataColnr++;
});
return rsDataPivot;
}
/* color schemes from d3js */

28
superx/xml/viz_components.xsl

@ -721,6 +721,10 @@ if(myRenderer=="echarts") @@ -721,6 +721,10 @@ if(myRenderer=="echarts")
{
renderEChart2(chartModel,chartDiv,rsNr,chartTitle);
}
else if(myRenderer=="viz")
{
renderVizBaseTools(chartModel,chartDiv,rsNr,chartTitle);
}
else
{
//d3js or plot:
@ -1227,11 +1231,15 @@ Stand: <xsl:value-of select="../stand" /></p> @@ -1227,11 +1231,15 @@ Stand: <xsl:value-of select="../stand" /></p>
<xsl:param name="kachelhoehe" select="600"/>
<xsl:param name="openModalCardDetail" select="'true'" />
<xsl:for-each select="ergebnisse/ergebnis[felder/feld[@varname='Grafik']/value!='']/ergebniselement">
<xsl:variable name="ergebniselement_counter" select="position()" />
<xsl:variable name="chart_uniquename"><xsl:value-of select="../felder/feld[@varname='Grafik']/value" /></xsl:variable>
<xsl:variable name="ergebniselement_ordnr"><xsl:value-of select="@ordnr" /></xsl:variable>
<xsl:variable name="maskennummer"><xsl:value-of select="@id" /></xsl:variable>
<xsl:for-each select="ergebnisse/ergebnis/ergebniselement[@id='44750']/sqlerg/row">
<xsl:variable name="ergebniselement_nr" select="col[f_name='sortnr']/wert" />
<xsl:variable name="chart_uniquename" select="col[f_name='hiddenchart_uniquename']/wert" />
<xsl:variable name="caption" select="col[f_name='caption']/wert" />
<xsl:variable name="ergebniselement_ordnr" select="col[f_name='hiddendatasource']/wert" />
<xsl:variable name="link_maskennummer"><xsl:value-of select="col[f_name='hiddenlink_maskennummer']/wert" /></xsl:variable>
<xsl:variable name="link_chart_uniquename"><xsl:value-of select="col[f_name='hiddenlink_chart_uniquename']/wert" /></xsl:variable>
<xsl:variable name="link_tablestylesheet"><xsl:value-of select="col[f_name='hiddenlink_tablestylesheet']/wert" /></xsl:variable>
<xsl:variable name="open_modal_card_detail"><xsl:value-of select="col[f_name='hiddenopen_modal_card_detail']/wert" /></xsl:variable>
<!--<p><xsl:value-of select="concat('Zähler: ',$ergebniselement_counter)"/></p>-->
@ -1245,16 +1253,16 @@ Stand: <xsl:value-of select="../stand" /></p> @@ -1245,16 +1253,16 @@ Stand: <xsl:value-of select="../stand" /></p>
</xsl:call-template>
<xsl:call-template name="viewer_kachel">
<xsl:with-param name="caption" select="viz_charts/viz_chart[@uniquename=$chart_uniquename]/@caption"/>
<xsl:with-param name="caption" select="$caption"/>
<xsl:with-param name="ergebniselement_ordnr" select="$ergebniselement_ordnr" />
<xsl:with-param name="kachelbreite" select="$kachelbreite - 5 "/><!-- wegen abgerundeter Ecken etwas kleiner-->
<xsl:with-param name="kachelhoehe" select="$kachelhoehe - 15"/>
<xsl:with-param name="chart_tid" select="viz_charts/viz_chart[@uniquename=$chart_uniquename]/@tid"/>
<xsl:with-param name="showEdit" select="/ergebnisse/user/@admin" />
<xsl:with-param name="link_maskennummer" select="$maskennummer"/>
<xsl:with-param name="link_chart_uniquename" select="$chart_uniquename" />
<xsl:with-param name="link_tablestylesheet" select="'viz_html_chart_viewer_mask_and_table.xsl'"/>
<xsl:with-param name="openModalCardDetail" select="$openModalCardDetail" />
<xsl:with-param name="link_maskennummer" select="$link_maskennummer"/>
<xsl:with-param name="link_chart_uniquename" select="$link_chart_uniquename" />
<xsl:with-param name="link_tablestylesheet" select="$link_tablestylesheet"/>
<xsl:with-param name="openModalCardDetail" select="$open_modal_card_detail" />
</xsl:call-template>
<!--<p><xsl:value-of select="concat($spalten_anz,'-',$ergebniselement_counter,':',$ergebniselement_counter mod $spalten_anz)"/></p>-->
</div>

2
superx/xml/viz_html_chart.xsl

@ -224,7 +224,7 @@ xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:HtmlUtils="de.superx.util @@ -224,7 +224,7 @@ xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:HtmlUtils="de.superx.util
<label class="label is-required is-small"><strong>Datentabelle</strong></label>
</div>
<!--<a onClick="exportDataTable(rs[0],rsColumnMetaData[0])">EXPORT</a>-->
<a onClick="exportDataTable(rs[0],rsColumnMetaData[0])">EXPORT</a>
<span class="separator">&#160;</span>
<span class="separator">&#160;</span>

7
superx/xml/viz_html_chart_viewer_mask_and_table.xsl

@ -40,11 +40,8 @@ xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:HtmlUtils="de.superx.util @@ -40,11 +40,8 @@ xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:HtmlUtils="de.superx.util
<xsl:call-template name="nd_htmlhead">
<xsl:with-param name="title" select="concat('Tabelle ',$maskenname)" />
</xsl:call-template>
<link rel="stylesheet" href="../style/sx_tabelle.css" />
<link rel="stylesheet" type="text/css" href="../style/sx_viz_muster.css" />
<!--<link rel="stylesheet" href="../style/superx.css" />-->
<xsl:call-template name="viz_html_chart_viewer_css" />
</head>
<xsl:call-template name="nd_htmlscript" />
<xsl:call-template name="nd_tableJavascript" />

Loading…
Cancel
Save