diff --git a/.gitignore b/.gitignore index 426c2d8..ccd6e2f 100644 --- a/.gitignore +++ b/.gitignore @@ -18,3 +18,4 @@ superx/WEB-INF/viz_dbforms-config_pg.xml *.tgz *.jasper +/build/ diff --git a/src-modules/module/viz/conf/viz.xml b/src-modules/module/viz/conf/viz.xml index 09ffbdd..1c1dce8 100644 --- a/src-modules/module/viz/conf/viz.xml +++ b/src-modules/module/viz/conf/viz.xml @@ -1156,6 +1156,8 @@ detail_chart_uniquename varchar(255) + + @@ -1174,12 +1176,14 @@ detail_chart_uniquename varchar(255) + - + + @@ -1361,6 +1365,8 @@ detail_chart_uniquename varchar(255) + + @@ -1373,7 +1379,8 @@ detail_chart_uniquename varchar(255) - + + @@ -1388,6 +1395,7 @@ detail_chart_uniquename varchar(255) + diff --git a/src-modules/module/viz/masken/44720_maskeninfo.unl b/src-modules/module/viz/masken/44720_maskeninfo.unl index 1c5a867..242d1f6 100644 --- a/src-modules/module/viz/masken/44720_maskeninfo.unl +++ b/src-modules/module/viz/masken/44720_maskeninfo.unl @@ -26,48 +26,19 @@ name as runtime_tablename\ ]]>\ \ \ >;\ + SELECT * from sp_rpta_column_layout('${basetable.name}',<>::varchar(255));\ \ ]]>\ >\ -/* and C.uniquename in (<>) */\ -order by CL.sortnr\ +SELECT * from sp_rpta_columns_in_layout(<>::varchar(255))\ +where 1=1\ +/* and column_uniquename in (<>) */\ +order by sortnr\ ;\ ]]>\ diff --git a/src-modules/module/viz/schluesseltabellen/rpta_column_layout_sos_stud_zeitreihe_jahr_fuellen.sql b/src-modules/module/viz/schluesseltabellen/rpta_column_layout_sos_stud_zeitreihe_jahr_fuellen.sql index 77dc78b..ee55b85 100644 --- a/src-modules/module/viz/schluesseltabellen/rpta_column_layout_sos_stud_zeitreihe_jahr_fuellen.sql +++ b/src-modules/module/viz/schluesseltabellen/rpta_column_layout_sos_stud_zeitreihe_jahr_fuellen.sql @@ -7,7 +7,7 @@ select count(*) from systeminfo where tid=330; <#assign rpta_column_layout = {"uniquename":"sos_stud_sem_jahr", -"caption":"Studierende nach Studienjahr", +"caption":"Studierende nach Studienjahr und Semestertyp", "rpta_resultset":"sos_stud_astat", "whereclause":"", "description":"Studierende nach Studienjahr" diff --git a/src-modules/module/viz/schluesseltabellen/viz_properties_echarts_bar_fuellen.sql b/src-modules/module/viz/schluesseltabellen/viz_properties_echarts_bar_fuellen.sql index c41f345..234d6ca 100644 --- a/src-modules/module/viz/schluesseltabellen/viz_properties_echarts_bar_fuellen.sql +++ b/src-modules/module/viz/schluesseltabellen/viz_properties_echarts_bar_fuellen.sql @@ -23,9 +23,34 @@ ] /> - +--TODO klappt noch nicht: {"viz_property_uniquename":"stroke","is_mandatory":"0"} <#assign viz_type_properties = [ -{"viz_property_uniquename":"barStacked"} +{"viz_property_uniquename":"x", +"is_mandatory":"1"}, +{"viz_property_uniquename":"y", +"is_mandatory":"1"}, +{"viz_property_uniquename":"stroke","is_mandatory":"0"}, +{"viz_property_uniquename":"xAxisNode"}, +{"viz_property_uniquename":"xAxisName"}, +{"viz_property_uniquename":"xAxisNameLocation"}, +{"viz_property_uniquename":"xAxisLabelNode"}, +{"viz_property_uniquename":"tickRotate_x"}, +{"viz_property_uniquename":"width_x"}, +{"viz_property_uniquename":"padding_x"}, +{"viz_property_uniquename":"fontsize_x"}, +{"viz_property_uniquename":"fontcolor_x"}, +{"viz_property_uniquename":"yAxisNode"}, +{"viz_property_uniquename":"yAxisName"}, +{"viz_property_uniquename":"yAxisLabelNode"}, +{"viz_property_uniquename":"tickRotate_y"}, +{"viz_property_uniquename":"width_y"}, +{"viz_property_uniquename":"padding_y"}, +{"viz_property_uniquename":"fontsize_y"}, +{"viz_property_uniquename":"fontcolor_y"}, +{"viz_property_uniquename":"singleColor"}, +{"viz_property_uniquename":"barStacked"}, +{"viz_property_uniquename":"seriesColorBy"} + ] /> diff --git a/src-modules/module/viz/schluesseltabellen/viz_properties_echarts_line_bar_series_fuellen.sql b/src-modules/module/viz/schluesseltabellen/viz_properties_echarts_line_bar_series_fuellen.sql deleted file mode 100644 index bf39962..0000000 --- a/src-modules/module/viz/schluesseltabellen/viz_properties_echarts_line_bar_series_fuellen.sql +++ /dev/null @@ -1,58 +0,0 @@ ---Freemarker Template ---obsolet -<#include "SQL_lingua_franca"/> -<#include "SuperX_general"/> -<#include "VIZ-Makros"/> - - - select tid from viz_renderer where uniquename='echarts'; - - -<#assign viz_types = [ -{"uniquename":"echarts_bar_y_series", "caption":"Säulendiagramm mit Serien (vertikal)", -"orientation":"V", -"description":"Vertikales Balkendiagramm mit Serien", -"explanation":""}, -{"uniquename":"echarts_line_y_series", "caption":"Liniendiagramm mit Serien (vertikal)", -"orientation":"V", -"description":"Vertikales Liniendiagramm mit Serien", -"explanation":""} -] -/> - - -<#assign viz_type_properties = [ -{"viz_property_uniquename":"stroke", -"is_mandatory":"1"}, -{"viz_property_uniquename":"series_selection_line"}, -{"viz_property_uniquename":"series_selection_column"} -{"viz_property_uniquename":"xAxisNode"}, -{"viz_property_uniquename":"xAxisName"}, -{"viz_property_uniquename":"xAxisLabelNode"}, -{"viz_property_uniquename":"tickRotate_x"}, -{"viz_property_uniquename":"width_x"}, -{"viz_property_uniquename":"padding_x"}, -{"viz_property_uniquename":"yAxisNode"}, -{"viz_property_uniquename":"yAxisName"}, -{"viz_property_uniquename":"xAxisNameLocation"}, -{"viz_property_uniquename":"yAxisLabelNode"}, -{"viz_property_uniquename":"tickRotate_y"}, -{"viz_property_uniquename":"width_y"}, -{"viz_property_uniquename":"padding_y"} -] -/> - -<@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 /> - - - - -<@drop_temp_tables /> - diff --git a/src-modules/module/viz/schluesseltabellen/viz_properties_echarts_line_bar_fuellen.sql b/src-modules/module/viz/schluesseltabellen/viz_properties_echarts_line_fuellen.sql similarity index 84% rename from src-modules/module/viz/schluesseltabellen/viz_properties_echarts_line_bar_fuellen.sql rename to src-modules/module/viz/schluesseltabellen/viz_properties_echarts_line_fuellen.sql index de2aa43..7ba0bc3 100644 --- a/src-modules/module/viz/schluesseltabellen/viz_properties_echarts_line_bar_fuellen.sql +++ b/src-modules/module/viz/schluesseltabellen/viz_properties_echarts_line_fuellen.sql @@ -9,14 +9,6 @@ <#assign viz_types = [ -{"uniquename":"echarts_bar_y", "caption":"Säulendiagramm (vertikal)", -"orientation":"V", -"description":"Vertikales Balkendiagramm", -"explanation":""}, -{"uniquename":"echarts_bar_x", "caption":"Balkendiagramm (horizontal)", -"orientation":"H", -"description":"Horizontales Balkendiagramm", -"explanation":""}, {"uniquename":"echarts_line_y", "caption":"Liniendiagramm (vertikal)", "orientation":"V", "description":"Vertikales Liniendiagramm", @@ -56,7 +48,6 @@ {"viz_property_uniquename":"fontsize_y"}, {"viz_property_uniquename":"fontcolor_y"}, {"viz_property_uniquename":"singleColor"}, -{"viz_property_uniquename":"barStacked"}, {"viz_property_uniquename":"seriesColorBy"} diff --git a/superx/xml/js/viz/viz_viewer.js b/superx/xml/js/viz/viz_viewer.js index dcc0444..fc5f81d 100644 --- a/superx/xml/js/viz/viz_viewer.js +++ b/superx/xml/js/viz/viz_viewer.js @@ -2131,7 +2131,7 @@ function createBarLineSeriesObj(currentChartModel,chartType,orientation,measureC smooth: true, encode: encodeObj, datasetIndex:datasetIndex, - stack:"myStack", + stack:(getChartPropertyValue(currentChartModel.chartPropertiesUsed,"barStacked")=="false")?"":"myStack", barWidth: '30%', showBackground: true, backgroundStyle: { @@ -2152,7 +2152,6 @@ function createBarLineSeriesObj(currentChartModel,chartType,orientation,measureC distance:30, //offset:[30, 40], // position:"bottom", - /*labelLayout:{}*/ position:getChartPropertyValue(currentChartModel.chartPropertiesUsed,"position_valueLabel"), //"bottom", offset: getOffsetValuelabelArray(getChartPropertyValue(currentChartModel.chartPropertiesUsed,"offset_x_valueLabel"), getChartPropertyValue(currentChartModel.chartPropertiesUsed,"offset_y_valueLabel")), @@ -2195,7 +2194,7 @@ myDataset.source.forEach((row) => { smooth: true, seriesLayoutBy: 'row', emphasis: { focus: 'series' }, - stack:"myStack", + stack:(getChartPropertyValue(currentChartModel.chartPropertiesUsed,"barStacked")=="false")?"":"myStack", name:row[0], label: { show: (getChartPropertyValue(currentChartModel.chartPropertiesUsed,"valueLabelShow")=="false")?false:true, //true @@ -2204,12 +2203,14 @@ myDataset.source.forEach((row) => { distance:30, //offset:[30, 40], // position:"bottom", - /*labelLayout:{}*/ position:getChartPropertyValue(currentChartModel.chartPropertiesUsed,"position_valueLabel"), //"bottom", offset: getOffsetValuelabelArray(getChartPropertyValue(currentChartModel.chartPropertiesUsed,"offset_x_valueLabel"), getChartPropertyValue(currentChartModel.chartPropertiesUsed,"offset_y_valueLabel")), - } + }, + labelLayout(params) { + return getLabelLayout(chartType,params,orientation) + } }; seriesArray.push(mySeriesObj); } @@ -2335,15 +2336,19 @@ function getLabelLayout(seriesType,params,orientation) x: params.rect.x +params.rect.width+ 30, y: params.rect.y + params.rect.height / 2, verticalAlign: 'middle', - align: 'right' + align: 'right', + hideOverlap: true + }; } else - return {verticalAlign: 'middle'}; + return {verticalAlign: 'middle', + hideOverlap: true}; } else {//line: - return {verticalAlign: 'bottom'}; + return {verticalAlign: 'bottom', + hideOverlap: true}; }