From 3b291cd23130df064a5480a145068b3f1aa82198 Mon Sep 17 00:00:00 2001 From: Imo John Date: Mon, 23 Nov 2026 10:26:41 +0100 Subject: [PATCH] =?UTF-8?q?Skalierung=20y-Achse;=20Linienst=C3=A4rke?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../viz_properties_echarts_fuellen.sql | 84 +++++++++++++++++++ .../viz_properties_echarts_line_fuellen.sql | 8 +- .../module/viz/upgrade/viz_upgrade_man.sql | 6 +- superx/xml/js/viz/viz_viewer.js | 26 ++++-- 4 files changed, 115 insertions(+), 9 deletions(-) diff --git a/src-modules/module/viz/schluesseltabellen/viz_properties_echarts_fuellen.sql b/src-modules/module/viz/schluesseltabellen/viz_properties_echarts_fuellen.sql index 58c9f1b..1f29339 100644 --- a/src-modules/module/viz/schluesseltabellen/viz_properties_echarts_fuellen.sql +++ b/src-modules/module/viz/schluesseltabellen/viz_properties_echarts_fuellen.sql @@ -562,6 +562,73 @@ "parent_property_uniquename":"yAxisNode", "variableName":"yAxisName" }, +{ "caption":"Wertebereich", +"prop_uniquename":"yAxisRangeNode", +"explanation":"Wertebereich-Element", +"prop_default":"", +"prop_unit":"", +"is_generic":"0", +"static_values":"", +"is_mandatory":"0", +"input_type_uniquename":"NODE", +"sortnr":"115", +"range_from":"", +"range_to":"", +"prop_value_type":"NODE", +"parent_property_uniquename":"yAxisNode", +"variableName":"yAxisRangeNode" +}, +{ "caption":"min. = Anteil des min. Datenwertes", +"prop_uniquename":"min_factor_y", +"explanation":"Sie geben das Minimum des Wertebereiches als Anteil des kleinsten Datenwertes an. In folgender Berechnung legen Sie X fest: [min. Datenwert * X] Default von X ist 0. Nachkommastellen für X möglich. Ergebnis wird abgerundet.", +"prop_default":"0", +"prop_unit":"", +"is_generic":"1", +"static_values":"", +"is_mandatory":"0", +"input_type_uniquename":"TEXT", +"property_group_uniquename":"", +"sortnr":"115", +"range_from":"0", +"range_to":"1", +"prop_value_type":"STRING", +"parent_property_uniquename":"yAxisRangeNode", +"variableName":"min_factor_y" +}, +{ "caption":"max. = Vielfaches von", +"prop_uniquename":"max_multiple_y", +"explanation":"Sie geben an, von welcher Zahl das Maximum des Wertebereiches ein Vielfaches ist. Default ist 5.", +"prop_default":"5", +"prop_unit":"", +"is_generic":"1", +"static_values":"", +"is_mandatory":"0", +"input_type_uniquename":"TEXT", +"property_group_uniquename":"", +"sortnr":"115", +"range_from":"", +"range_to":"", +"prop_value_type":"STRING", +"parent_property_uniquename":"yAxisRangeNode", +"variableName":"max_multiple_y" +}, +/*{ "caption":"Wertebereich Intervall", +"prop_uniquename":"interval_y", +"explanation":"Wertebereich Intervall", +"prop_default":"", +"prop_unit":"", +"is_generic":"1", +"static_values":"", +"is_mandatory":"0", +"input_type_uniquename":"TEXT", +"property_group_uniquename":"", +"sortnr":"110", +"range_from":"", +"range_to":"", +"prop_value_type":"STRING", +"parent_property_uniquename":"yAxisNode", +"variableName":"interval_y" +},*/ { "caption":"Y-Achse Beschriftung", "prop_uniquename":"yAxisLabelNode", "explanation":"Y-Achse-Beschriftung", @@ -943,6 +1010,23 @@ "parent_property_uniquename":"seriesNode", "variableName":"seriesColorBy" }, +{ "caption":"Linien Stärke", +"prop_uniquename":"lineStyle_width", +"explanation":"Stärke der Linien. Default ist 7.", +"prop_default":"7", +"prop_unit":"", +"is_generic":"0", +"static_values":"", +"is_mandatory":"0", +"input_type_uniquename":"TEXT", +"property_group_uniquename":"", +"sortnr":"416", +"range_from":"", +"range_to":"", +"prop_value_type":"STRING", +"parent_property_uniquename":"seriesNode", +"variableName":"lineStyle_width" +}, { "caption":"Innerer Radius in %", "prop_uniquename":"innerRadius", "explanation":"Innerer Radius bei Tortendiagrammen (Faktor in %). Bei 0 wird kein innerer Radius genutzt, ein Wert größer 0 macht das Tortendiagramm zum Donut.", diff --git a/src-modules/module/viz/schluesseltabellen/viz_properties_echarts_line_fuellen.sql b/src-modules/module/viz/schluesseltabellen/viz_properties_echarts_line_fuellen.sql index 7ba0bc3..dfd7db6 100644 --- a/src-modules/module/viz/schluesseltabellen/viz_properties_echarts_line_fuellen.sql +++ b/src-modules/module/viz/schluesseltabellen/viz_properties_echarts_line_fuellen.sql @@ -48,7 +48,13 @@ {"viz_property_uniquename":"fontsize_y"}, {"viz_property_uniquename":"fontcolor_y"}, {"viz_property_uniquename":"singleColor"}, -{"viz_property_uniquename":"seriesColorBy"} +{"viz_property_uniquename":"seriesColorBy"}, +{"viz_property_uniquename":"yAxisRangeNode"}, +{"viz_property_uniquename":"min_factor_y"}, +{"viz_property_uniquename":"max_multiple_y"}, +-- {"viz_property_uniquename":"interval_y"}, +{"viz_property_uniquename":"lineStyle_width"} + ] diff --git a/src-modules/module/viz/upgrade/viz_upgrade_man.sql b/src-modules/module/viz/upgrade/viz_upgrade_man.sql index b8f6cc0..1471d09 100644 --- a/src-modules/module/viz/upgrade/viz_upgrade_man.sql +++ b/src-modules/module/viz/upgrade/viz_upgrade_man.sql @@ -59,6 +59,6 @@ where T.uniquename in ('echarts_bar_x_series','echarts_bar_y_series','echarts_li delete from viz_type where uniquename in ('echarts_bar_x_series','echarts_bar_y_series','echarts_line_x_series','echarts_line_y_series'); ---Sankey nicht mehr über d3js, sondern Echarts: -delete from viz_chart where is_custom=0 -and uniquename='ERFOLG_BA_MA_SANKEY'; + +delete from viz_chart where is_custom=0 and uniquename='ERFOLG_BA_MA_SANKEY'; --Sankey nicht mehr über d3js, sondern Echarts +delete from viz_chart where is_custom=0 and uniquename='echarts_line_y_47230_2hsen'; --durch neues Diagramm ersetzt diff --git a/superx/xml/js/viz/viz_viewer.js b/superx/xml/js/viz/viz_viewer.js index b340d9b..a94e8a2 100644 --- a/superx/xml/js/viz/viz_viewer.js +++ b/superx/xml/js/viz/viz_viewer.js @@ -1996,7 +1996,13 @@ var seriesArray=getEchartSeriesArray(currentChartModel,chartType,orientation,myD position:getChartPropertyValue(currentChartModel.chartPropertiesUsed,"position_y"), formatter: (value) => value.toLocaleString(), color: getChartPropertyValue(currentChartModel.chartPropertiesUsed,"fontcolor_y") - } + }, + min: function (yAxisType) { + return Math.floor(yAxisType.min * getChartPropertyValue(currentChartModel.chartPropertiesUsed,"min_factor_y")); + }, + max: function (yAxisType) { + return Math.ceil(yAxisType.max * 1.05 / getChartPropertyValue(currentChartModel.chartPropertiesUsed,"max_multiple_y")) * getChartPropertyValue(currentChartModel.chartPropertiesUsed,"max_multiple_y"); // 5% Puffer zum höchsten Wert und Rundung auf Vielfaches von 5 + } }, series: seriesArray, color:myPalette @@ -2142,7 +2148,7 @@ function createBarLineSeriesObj(currentChartModel,chartType,orientation,measureC colorBy: getChartPropertyValue(currentChartModel.chartPropertiesUsed,"seriesColorBy"),//'series',// 'data', //color: myPalette, lineStyle: { - width: 7 + width: getChartPropertyValue(currentChartModel.chartPropertiesUsed,"lineStyle_width") }, label: { show: (getChartPropertyValue(currentChartModel.chartPropertiesUsed,"valueLabelShow")=="false")?false:true, //true @@ -2155,8 +2161,12 @@ function createBarLineSeriesObj(currentChartModel,chartType,orientation,measureC position:getChartPropertyValue(currentChartModel.chartPropertiesUsed,"position_valueLabel"), //"bottom", offset: getOffsetValuelabelArray(getChartPropertyValue(currentChartModel.chartPropertiesUsed,"offset_x_valueLabel"), getChartPropertyValue(currentChartModel.chartPropertiesUsed,"offset_y_valueLabel")), - formatter: function (params) { - return params.value[params.dimensionNames[params.encode.y[0]]].toLocaleString() + formatter: function (params) { + const value = params.value[params.dimensionNames[params.encode.y[0]]]; + return value.toLocaleString('de-DE', { //Formatierung für Deutsch (z. B. Tausendertrennzeichen) + minimumFractionDigits: 0, // minimale Anzahl Nachkommastellen + maximumFractionDigits: 0 // maximale Anzahl Nachkommastellen + }); } }, @@ -2300,7 +2310,13 @@ var option = { position:getChartPropertyValue(currentChartModel.chartPropertiesUsed,"position_y"), formatter: (value) => value.toLocaleString() - } + }, + min: function (yAxisType) { + return Math.floor(yAxisType.min * getChartPropertyValue(currentChartModel.chartPropertiesUsed,"min_factor_y")); + }, + max: function (yAxisType) { + return Math.ceil(yAxisType.max * 1.05 / getChartPropertyValue(currentChartModel.chartPropertiesUsed,"max_multiple_y")) * getChartPropertyValue(currentChartModel.chartPropertiesUsed,"max_multiple_y"); // 5% Puffer zum höchsten Wert und Rundung auf Vielfaches von 5 + } }, series: seriesArray, color:myPalette