Browse Source

Skalierung y-Achse; Linienstärke

master
Imo John 7 hours ago
parent
commit
3b291cd231
  1. 84
      src-modules/module/viz/schluesseltabellen/viz_properties_echarts_fuellen.sql
  2. 8
      src-modules/module/viz/schluesseltabellen/viz_properties_echarts_line_fuellen.sql
  3. 6
      src-modules/module/viz/upgrade/viz_upgrade_man.sql
  4. 26
      superx/xml/js/viz/viz_viewer.js

84
src-modules/module/viz/schluesseltabellen/viz_properties_echarts_fuellen.sql

@ -562,6 +562,73 @@
"parent_property_uniquename":"yAxisNode", "parent_property_uniquename":"yAxisNode",
"variableName":"yAxisName" "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", { "caption":"Y-Achse Beschriftung",
"prop_uniquename":"yAxisLabelNode", "prop_uniquename":"yAxisLabelNode",
"explanation":"Y-Achse-Beschriftung", "explanation":"Y-Achse-Beschriftung",
@ -943,6 +1010,23 @@
"parent_property_uniquename":"seriesNode", "parent_property_uniquename":"seriesNode",
"variableName":"seriesColorBy" "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 %", { "caption":"Innerer Radius in %",
"prop_uniquename":"innerRadius", "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.", "explanation":"Innerer Radius bei Tortendiagrammen (Faktor in %). Bei 0 wird kein innerer Radius genutzt, ein Wert größer 0 macht das Tortendiagramm zum Donut.",

8
src-modules/module/viz/schluesseltabellen/viz_properties_echarts_line_fuellen.sql

@ -48,7 +48,13 @@
{"viz_property_uniquename":"fontsize_y"}, {"viz_property_uniquename":"fontsize_y"},
{"viz_property_uniquename":"fontcolor_y"}, {"viz_property_uniquename":"fontcolor_y"},
{"viz_property_uniquename":"singleColor"}, {"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"}
] ]

6
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 delete from viz_type
where uniquename in ('echarts_bar_x_series','echarts_bar_y_series','echarts_line_x_series','echarts_line_y_series'); 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 delete from viz_chart where is_custom=0 and uniquename='ERFOLG_BA_MA_SANKEY'; --Sankey nicht mehr über d3js, sondern Echarts
and uniquename='ERFOLG_BA_MA_SANKEY'; delete from viz_chart where is_custom=0 and uniquename='echarts_line_y_47230_2hsen'; --durch neues Diagramm ersetzt

26
superx/xml/js/viz/viz_viewer.js

@ -1996,7 +1996,13 @@ var seriesArray=getEchartSeriesArray(currentChartModel,chartType,orientation,myD
position:getChartPropertyValue(currentChartModel.chartPropertiesUsed,"position_y"), position:getChartPropertyValue(currentChartModel.chartPropertiesUsed,"position_y"),
formatter: (value) => value.toLocaleString(), formatter: (value) => value.toLocaleString(),
color: getChartPropertyValue(currentChartModel.chartPropertiesUsed,"fontcolor_y") 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, series: seriesArray,
color:myPalette color:myPalette
@ -2142,7 +2148,7 @@ function createBarLineSeriesObj(currentChartModel,chartType,orientation,measureC
colorBy: getChartPropertyValue(currentChartModel.chartPropertiesUsed,"seriesColorBy"),//'series',// 'data', colorBy: getChartPropertyValue(currentChartModel.chartPropertiesUsed,"seriesColorBy"),//'series',// 'data',
//color: myPalette, //color: myPalette,
lineStyle: { lineStyle: {
width: 7 width: getChartPropertyValue(currentChartModel.chartPropertiesUsed,"lineStyle_width")
}, },
label: { label: {
show: (getChartPropertyValue(currentChartModel.chartPropertiesUsed,"valueLabelShow")=="false")?false:true, //true 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", position:getChartPropertyValue(currentChartModel.chartPropertiesUsed,"position_valueLabel"), //"bottom",
offset: getOffsetValuelabelArray(getChartPropertyValue(currentChartModel.chartPropertiesUsed,"offset_x_valueLabel"), offset: getOffsetValuelabelArray(getChartPropertyValue(currentChartModel.chartPropertiesUsed,"offset_x_valueLabel"),
getChartPropertyValue(currentChartModel.chartPropertiesUsed,"offset_y_valueLabel")), getChartPropertyValue(currentChartModel.chartPropertiesUsed,"offset_y_valueLabel")),
formatter: function (params) { formatter: function (params) {
return params.value[params.dimensionNames[params.encode.y[0]]].toLocaleString() 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"), position:getChartPropertyValue(currentChartModel.chartPropertiesUsed,"position_y"),
formatter: (value) => value.toLocaleString() 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, series: seriesArray,
color:myPalette color:myPalette

Loading…
Cancel
Save