Browse Source

Anpassung Assistent: chartModels speichern bei Reiter Grafiknutzung #5

master
Daniel Quathamer 6 days ago
parent
commit
64e6a75e09
  1. 52
      src-modules/module/viz/conf/viz.xml
  2. 6
      src-modules/module/viz/schluesseltabellen/customxmladd.sql
  3. 47
      src-modules/module/viz/schluesseltabellen/viz_chart_fuellen.sql
  4. 200
      src-modules/module/viz/schluesseltabellen/viz_properties_d3js_fuellen.sql
  5. 43
      src-modules/module/viz/schluesseltabellen/viz_properties_d3js_pie_fuellen.sql
  6. 44
      src-modules/module/viz/schluesseltabellen/viz_properties_d3js_sankey_fuellen.sql
  7. 40
      src-modules/module/viz/schluesseltabellen/viz_properties_d3js_worldmap_fuellen.sql
  8. 33
      src-modules/module/viz/schluesseltabellen/viz_properties_echarts_fuellen.sql
  9. 1
      src-modules/module/viz/schluesseltabellen/viz_properties_echarts_line_bar_fuellen.sql
  10. 1
      src-modules/module/viz/schluesseltabellen/viz_properties_echarts_line_bar_series_fuellen.sql
  11. 170
      src-modules/module/viz/schluesseltabellen/viz_properties_plot_fuellen.sql
  12. 79
      src-modules/module/viz/schluesseltabellen/viz_properties_plot_line_bar_boxplot_fuellen.sql
  13. 1
      src-modules/module/viz/schluesseltabellen/viz_type_plot_fuellen.sql
  14. 263
      superx/edit/viz/viz_chart_bearbeiten.jsp
  15. 55
      superx/xml/js/viz/viz_assistent.js
  16. 39
      superx/xml/js/viz/viz_viewer.js
  17. 44
      superx/xml/viz_components.xsl
  18. 128
      superx/xml/viz_html_chart.xsl

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

@ -790,11 +790,19 @@ scriptfile="" database=""/> @@ -790,11 +790,19 @@ scriptfile="" database=""/>
<nativeaction sql="" scriptfile="$VIZ_PFAD/schluesseltabellen/konstanten_fuellen.sql" database=""/>
<nativeaction sql="" scriptfile="$VIZ_PFAD/schluesseltabellen/sx_stylesheets_einfuegen.sql" database=""/>
<nativeaction sql="" scriptfile="$VIZ_PFAD/schluesseltabellen/macro_masken_bez_fuellen.sql" database=""/>
<nativeaction sql="" scriptfile="$VIZ_PFAD/schluesseltabellen/viz_type_plot_fuellen.sql" database=""/>
<nativeaction sql="" scriptfile="$VIZ_PFAD/schluesseltabellen/viz_properties_plot_fuellen.sql" database=""/>
<nativeaction sql="" scriptfile="$VIZ_PFAD/schluesseltabellen/viz_properties_plot_line_bar_boxplot_fuellen.sql" database=""/>
<nativeaction sql="" scriptfile="$VIZ_PFAD/schluesseltabellen/viz_properties_echarts_fuellen.sql" database=""/>
<nativeaction sql="" scriptfile="$VIZ_PFAD/schluesseltabellen/viz_properties_echarts_line_bar_fuellen.sql" database=""/>
<nativeaction sql="" scriptfile="$VIZ_PFAD/schluesseltabellen/viz_properties_echarts_line_bar_series_fuellen.sql" database=""/>
<nativeaction sql="" scriptfile="$VIZ_PFAD/schluesseltabellen/viz_properties_echarts_pie_fuellen.sql" database=""/>
<nativeaction sql="" scriptfile="$VIZ_PFAD/schluesseltabellen/viz_properties_d3js_fuellen.sql" database=""/>
<nativeaction sql="" scriptfile="$VIZ_PFAD/schluesseltabellen/viz_properties_d3js_pie_fuellen.sql" database=""/>
<nativeaction sql="" scriptfile="$VIZ_PFAD/schluesseltabellen/viz_properties_d3js_sankey_fuellen.sql" database=""/>
<nativeaction sql="" scriptfile="$VIZ_PFAD/schluesseltabellen/viz_properties_d3js_worldmap_fuellen.sql" database=""/>
<nativeaction sql="" scriptfile="$VIZ_PFAD/schluesseltabellen/studierende_datenblatt_dashboard.sql" database=""/>
<nativeaction sql="" scriptfile="$VIZ_PFAD/schluesseltabellen/rpta_column_layout_sos_stud_fak_fuellen.sql" database=""/>
@ -906,33 +914,67 @@ gueltig_bis DATE @@ -906,33 +914,67 @@ gueltig_bis DATE
version integer default 1
) ;"
scriptfile="" database=""/>
<nativeaction sql="create table tmp_viz_chart(
tid SERIAL not null,
uniquename VARCHAR(255) not null,
caption VARCHAR(255) ,
description TEXT ,
chartmodel TEXT ,
preview_svg TEXT ,
userinfo_id INTEGER ,
creation_date DATE default today(),
update_date DATE default today(),
maskeninfo_id INTEGER ,
mask_params TEXT ,
renderer_id INTEGER ,
chartmodel_miniature TEXT ,
chart_position CHAR(10) ,
chart_active SMALLINT default 1 ,
chart_width INTEGER default 600 ,
chart_height INTEGER default 400 ,
chart_miniature_width INTEGER default 200 ,
chart_miniature_height INTEGER default 100
)
;" scriptfile="" database=""/>
</action>
<action error="stop">
<loadtable refresh="true" delimiter="^" header="false" tabname="tmp_repository"><file path="$VIZ_PFAD/schluesseltabellen/sx_repository.unl"/></loadtable>
<loadtable refresh="true" delimiter="^" header="false" tabname="tmp_templates"><file path="$VIZ_PFAD/schluesseltabellen/fm_templates.unl"/></loadtable>
<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="tmp_templates"><file path="$VIZ_PFAD/schluesseltabellen/viz_chart.unl"/></loadtable>
<!--<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="viz_property_input_type"><file path="$VIZ_PFAD/schluesseltabellen/viz_property_input_type.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>
<loadtable refresh="true" delimiter="^" header="false" tabname="viz_property_renderer"><file path="$VIZ_PFAD/schluesseltabellen/viz_property_renderer.unl"/></loadtable>
<loadtable refresh="true" delimiter="^" header="false" tabname="viz_property_group_renderer"><file path="$VIZ_PFAD/schluesseltabellen/viz_property_group_renderer.unl"/></loadtable>
<loadtable refresh="true" delimiter="^" header="false" tabname="viz_type_property"><file path="$VIZ_PFAD/schluesseltabellen/viz_type_property.unl"/></loadtable>
<!--<loadtable refresh="true" delimiter="^" header="false" tabname="viz_type_property"><file path="$VIZ_PFAD/schluesseltabellen/viz_type_property.unl"/></loadtable>
-->
<loadtable refresh="true" delimiter="^" header="false" tabname="viz_staat_isocode"><file path="$VIZ_PFAD/schluesseltabellen/viz_staat_isocode.unl"/></loadtable>
</action>
<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_chart_fuellen.sql" database=""/>
<nativeaction sql="" scriptfile="$VIZ_PFAD/schluesseltabellen/konstanten_fuellen.sql" database=""/>
<nativeaction sql="" scriptfile="$VIZ_PFAD/schluesseltabellen/sachgebiete_fuellen.sql" database=""/>
<nativeaction sql="" scriptfile="$VIZ_PFAD/upgrade/viz_upgrade_man.sql" database=""/>
<nativeaction sql="" scriptfile="$VIZ_PFAD/schluesseltabellen/viz_type_plot_fuellen.sql" database=""/>
<nativeaction sql="" scriptfile="$VIZ_PFAD/schluesseltabellen/viz_properties_plot_fuellen.sql" database=""/>
<nativeaction sql="" scriptfile="$VIZ_PFAD/schluesseltabellen/viz_properties_plot_line_bar_boxplot_fuellen.sql" database=""/>
<nativeaction sql="" scriptfile="$VIZ_PFAD/schluesseltabellen/viz_properties_echarts_fuellen.sql" database=""/>
<nativeaction sql="" scriptfile="$VIZ_PFAD/schluesseltabellen/viz_properties_echarts_line_bar_fuellen.sql" database=""/>
<nativeaction sql="" scriptfile="$VIZ_PFAD/schluesseltabellen/viz_properties_echarts_line_bar_series_fuellen.sql" database=""/>
<nativeaction sql="" scriptfile="$VIZ_PFAD/schluesseltabellen/viz_properties_echarts_pie_fuellen.sql" database=""/>
<nativeaction sql="" scriptfile="$VIZ_PFAD/schluesseltabellen/viz_properties_d3js_fuellen.sql" database=""/>
<nativeaction sql="" scriptfile="$VIZ_PFAD/schluesseltabellen/viz_properties_d3js_pie_fuellen.sql" database=""/>
<nativeaction sql="" scriptfile="$VIZ_PFAD/schluesseltabellen/viz_properties_d3js_sankey_fuellen.sql" database=""/>
<nativeaction sql="" scriptfile="$VIZ_PFAD/schluesseltabellen/viz_properties_d3js_worldmap_fuellen.sql" database=""/>
</action>
<action error="stop">
<nativeaction sql="" scriptfile="$VIZ_PFAD/schluesseltabellen/sx_stylesheets_einfuegen.sql" database=""/>

6
src-modules/module/viz/schluesseltabellen/customxmladd.sql

@ -98,10 +98,12 @@ V.chart_position, @@ -98,10 +98,12 @@ V.chart_position,
--replace(V.chartcode,'"','§') as chartcode_escaped,
--replace(V.datasource_def,'"','§') as datasource_def_escaped
R.uniquename as renderer_uniquename,
R.tid as renderer_id,
V.chart_width,
V.chart_height,
V.chart_miniature_width,
V.chart_miniature_height
V.chart_miniature_height,
V.maskeninfo_id
FROM viz_chart V, viz_renderer R
where R.tid=V.renderer_id
and chart_active=1
@ -256,10 +258,12 @@ order by 1,2,R.sortnr; @@ -256,10 +258,12 @@ order by 1,2,R.sortnr;
chartmodel_miniature="${ch.chartmodel_miniature_escaped}"
chart_position="${ch.chart_position}"
renderer="${ch.renderer_uniquename}"
renderer_id="${ch.renderer_id}"
chart_width="${ch.chart_width}"
chart_height="${ch.chart_height}"
chart_miniature_width="${ch.chart_width}"
chart_miniature_height="${ch.chart_height}"
maskeninfo_id="${ch.maskeninfo_id}"
/>
</#foreach>
</#if>

47
src-modules/module/viz/schluesseltabellen/viz_chart_fuellen.sql

@ -0,0 +1,47 @@ @@ -0,0 +1,47 @@
delete from viz_chart where uniquename in (select uniquename from tmp_viz_chart);
select sp_update_sequence('viz_chart');
insert into viz_chart(
uniquename,
caption,
description,
chartmodel,
preview_svg,
userinfo_id,
creation_date,
update_date,
maskeninfo_id,
mask_params,
renderer_id,
chartmodel_miniature,
chart_position,
chart_active,
chart_width,
chart_height,
chart_miniature_width,
chart_miniature_height)
select
uniquename,
caption,
description,
chartmodel,
preview_svg,
userinfo_id,
creation_date,
update_date,
maskeninfo_id,
mask_params,
renderer_id,
chartmodel_miniature,
chart_position,
chart_active,
chart_width,
chart_height,
chart_miniature_width,
chart_miniature_height
FROM tmp_viz_chart;
drop table tmp_viz_chart;

200
src-modules/module/viz/schluesseltabellen/viz_properties_d3js_fuellen.sql

@ -0,0 +1,200 @@ @@ -0,0 +1,200 @@
--Freemarker Template
<#include "SQL_lingua_franca"/>
<#include "SuperX_general"/>
<#include "VIZ-Makros"/>
<sqlvars>
<sqlvar name="renderer">
select tid from viz_renderer where uniquename='d3js';
</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":"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":"Dimension 2",
"prop_uniquename":"dimension2",
"explanation":"Dimension 2",
"prop_default":"",
"prop_unit":"",
"is_generic":"0",
"static_values":"",
"is_mandatory":"0",
"input_type_uniquename":"SELECT",
"property_group_uniquename":"CATEGORY",
"sortnr":"609",
"range_from":"",
"range_to":"",
"prop_value_type":"string",
"parent_property_uniquename":"dimensionsNode"
},
{ "caption":"Dimension 3",
"prop_uniquename":"dimension3",
"explanation":"Dimension 3",
"prop_default":"",
"prop_unit":"",
"is_generic":"0",
"static_values":"",
"is_mandatory":"0",
"input_type_uniquename":"SELECT",
"property_group_uniquename":"CATEGORY",
"sortnr":"609",
"range_from":"",
"range_to":"",
"prop_value_type":"string",
"parent_property_uniquename":"dimensionsNode"
},
{ "caption":"Diagrammelement",
"prop_uniquename":"seriesNode",
"explanation":"Layout der Diagrammelemente",
"prop_default":"",
"prop_unit":"",
"is_generic":"1",
"static_values":"",
"is_mandatory":"0",
"input_type_uniquename":"NODE",
"sortnr":"400",
"range_from":"",
"range_to":"",
"prop_value_type":"NODE",
"parent_property_uniquename":"",
"variableName":"seriesNode"
},
{ "caption":"Innerer Radius",
"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.",
"prop_default":"0",
"prop_unit":"",
"is_generic":"0",
"static_values":"",
"is_mandatory":"0",
"input_type_uniquename":"TEXT",
"property_group_uniquename":"LAYOUT",
"sortnr":"",
"range_from":"0",
"range_to":"100",
"prop_value_type":"string",
"parent_property_uniquename":"seriesNode"
},
{ "caption":"Beschriftung Radius",
"prop_uniquename":"labelRadiusFactor",
"explanation":"Beschriftungs-Radius Faktor bei Tortendiagrammen (Faktor in %). Bei 0 wird kein innerer Radius genutzt, ein Wert größer 0 macht das Tortendiagramm zum Donut.",
"prop_default":"80",
"prop_unit":"",
"is_generic":"0",
"static_values":"",
"is_mandatory":"0",
"input_type_uniquename":"TEXT",
"property_group_uniquename":"LAYOUT",
"sortnr":"",
"range_from":"0",
"range_to":"100",
"prop_value_type":"string",
"parent_property_uniquename":"seriesNode"
},
{ "caption":"Kanten-Radius",
"prop_uniquename":"cornerRadius",
"explanation":"Ecken-Radius bei Tortendiagrammen (in Pixel). Bei 0 wird keine gerundete Kante genutzt, ein Wert größer 0 macht das Tortendiagramm zum Donut.",
"prop_default":"10",
"prop_unit":"px",
"is_generic":"0",
"static_values":"",
"is_mandatory":"0",
"input_type_uniquename":"TEXT",
"property_group_uniquename":"LAYOUT",
"sortnr":"",
"range_from":"0",
"range_to":"50",
"prop_value_type":"string",
"parent_property_uniquename":"seriesNode"
},
{ "caption":"Label-Deckungsgrad",
"prop_uniquename":"labelOpacity",
"explanation":"Deckungsgrad Faktor bei Beschriftungen (Faktor in %). Bei 100 ist maximale Deckung erreicht",
"prop_default":"70",
"prop_unit":"",
"is_generic":"0",
"static_values":"",
"is_mandatory":"0",
"input_type_uniquename":"TEXT",
"property_group_uniquename":"LAYOUT",
"sortnr":"",
"range_from":"0",
"range_to":"100",
"prop_value_type":"string",
"parent_property_uniquename":"seriesNode"
},
{ "caption":"Leerzeilen-Maskierung",
"prop_uniquename":"null_value_mask",
"explanation":"Text, der ersetzt wird, wenn eine Dimension leer ist, z.B. *Andere Hochschule* bei BA-MA-Übergang",
"prop_default":"",
"prop_unit":"",
"is_generic":"0",
"static_values":"",
"is_mandatory":"0",
"input_type_uniquename":"TEXT",
"property_group_uniquename":"LAYOUT",
"sortnr":"",
"range_from":"",
"range_to":"",
"prop_value_type":"string",
"parent_property_uniquename":"seriesNode"
}
]
/>
<@create_temp_tables />
<@fill_viz_properties />

43
src-modules/module/viz/schluesseltabellen/viz_properties_d3js_pie_fuellen.sql

@ -0,0 +1,43 @@ @@ -0,0 +1,43 @@
--Freemarker Template
<#include "SQL_lingua_franca"/>
<#include "SuperX_general"/>
<#include "VIZ-Makros"/>
<sqlvars>
<sqlvar name="renderer">
select tid from viz_renderer where uniquename='d3js';
</sqlvar>
</sqlvars>
<#assign viz_types = [
{"uniquename":"pie", "caption":"Tortendiagramm",
"orientation":"Z",
"description":"Tortendiagramm",
"explanation":""}
]
/>
<#assign viz_type_properties = [
{"viz_property_uniquename":"dimension1",
"is_mandatory":"1"},
{"viz_property_uniquename":"measure1",
"is_mandatory":"1"},
{"viz_property_uniquename":"innerRadius"},
{"viz_property_uniquename":"labelRadiusFactor"},
{"viz_property_uniquename":"cornerRadius"}
]
/>
<@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>

44
src-modules/module/viz/schluesseltabellen/viz_properties_d3js_sankey_fuellen.sql

@ -0,0 +1,44 @@ @@ -0,0 +1,44 @@
--Freemarker Template
<#include "SQL_lingua_franca"/>
<#include "SuperX_general"/>
<#include "VIZ-Makros"/>
<sqlvars>
<sqlvar name="renderer">
select tid from viz_renderer where uniquename='d3js';
</sqlvar>
</sqlvars>
<#assign viz_types = [
{"uniquename":"sankey", "caption":"Sankey",
"orientation":"H",
"description":"Horizontales Sankeydiagramm",
"explanation":""}
]
/>
<#assign viz_type_properties = [
{"viz_property_uniquename":"dimension1",
"is_mandatory":"1"},
{"viz_property_uniquename":"dimension2",
"is_mandatory":"1"},
{"viz_property_uniquename":"measure1",
"is_mandatory":"1"},
{"viz_property_uniquename":"null_value_mask",
"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>

40
src-modules/module/viz/schluesseltabellen/viz_properties_d3js_worldmap_fuellen.sql

@ -0,0 +1,40 @@ @@ -0,0 +1,40 @@
--Freemarker Template
<#include "SQL_lingua_franca"/>
<#include "SuperX_general"/>
<#include "VIZ-Makros"/>
<sqlvars>
<sqlvar name="renderer">
select tid from viz_renderer where uniquename='d3js';
</sqlvar>
</sqlvars>
<#assign viz_types = [
{"uniquename":"worldmap", "caption":"Weltkarte",
"orientation":"H",
"description":"Weltkarte",
"explanation":""}
]
/>
<#assign viz_type_properties = [
{"viz_property_uniquename":"dimension1",
"is_mandatory":"1"},
{"viz_property_uniquename":"measure1",
"is_mandatory":"1"}
]
/>
<@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>

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

@ -285,6 +285,22 @@ @@ -285,6 +285,22 @@
"parent_property_uniquename":"xAxisNode",
"variableName":"xAxisName"
},
{ "caption":"X-Achse Name Position",
"prop_uniquename":"xAxisNameLocation",
"explanation":"Position der X-Achsenbezeichnung",
"prop_default":"end",
"prop_unit":"",
"is_generic":"0",
"static_values":"start|center|end",
"is_mandatory":"0",
"input_type_uniquename":"SELECT",
"sortnr":"25",
"range_from":"",
"range_to":"",
"prop_value_type":"STRING",
"parent_property_uniquename":"xAxisNode",
"variableName":"xAxisNameLocation"
},
{ "caption":"X-Achse Beschriftung",
"prop_uniquename":"xAxisLabelNode",
"explanation":"X-Achse-Beschriftung",
@ -560,6 +576,23 @@ @@ -560,6 +576,23 @@
"parent_property_uniquename":"",
"variableName":"seriesNode"
},
{ "caption":"Einzelfarbe",
"prop_uniquename":"singleColor",
"explanation":"Linien- oder Balkenfarbe (einfach). Wird mit höherer Priorität ausgewertet als die Palette",
"prop_default":"",
"prop_unit":"",
"is_generic":"1",
"static_values":"",
"is_mandatory":"0",
"input_type_uniquename":"COLOR",
"property_group_uniquename":"STYLE",
"sortnr":"405",
"range_from":"",
"range_to":"",
"prop_value_type":"string",
"parent_property_uniquename":"seriesNode",
"variableName":"singleColor"
},
{ "caption":"Farbpalette (vordef.)",
"prop_uniquename":"schemeArray",
"explanation":"Farbpalette",

1
src-modules/module/viz/schluesseltabellen/viz_properties_echarts_line_bar_fuellen.sql

@ -39,6 +39,7 @@ @@ -39,6 +39,7 @@
"is_mandatory":"1"},
{"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"},

1
src-modules/module/viz/schluesseltabellen/viz_properties_echarts_line_bar_series_fuellen.sql

@ -33,6 +33,7 @@ @@ -33,6 +33,7 @@
{"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"},

170
src-modules/module/viz/schluesseltabellen/viz_properties_plot_fuellen.sql

@ -0,0 +1,170 @@ @@ -0,0 +1,170 @@
--Freemarker Template
<#include "SQL_lingua_franca"/>
<#include "SuperX_general"/>
<#include "VIZ-Makros"/>
<sqlvars>
<sqlvar name="renderer">
select tid from viz_renderer where uniquename='plot';
</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":"X-Achse",
"prop_uniquename":"x",
"explanation":"X-Achse",
"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":"Y-Achse",
"prop_uniquename":"y",
"explanation":"Y-Achse",
"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":"Serien-Dimension",
"prop_uniquename":"stroke",
"explanation":"Serien-Dimension",
"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":"Diagrammelement",
"prop_uniquename":"seriesNode",
"explanation":"Layout der Diagrammelemente",
"prop_default":"",
"prop_unit":"",
"is_generic":"1",
"static_values":"",
"is_mandatory":"0",
"input_type_uniquename":"NODE",
"sortnr":"400",
"range_from":"",
"range_to":"",
"prop_value_type":"NODE",
"parent_property_uniquename":"",
"variableName":"seriesNode"
},
{ "caption":"Strichfarbe",
"prop_uniquename":"stroke_static",
"explanation":"Strichfarbe (einfach)",
"prop_default":"",
"prop_unit":"",
"is_generic":"0",
"static_values":"",
"is_mandatory":"0",
"input_type_uniquename":"COLOR",
"property_group_uniquename":"STYLE",
"sortnr":"",
"range_from":"",
"range_to":"",
"prop_value_type":"string",
"parent_property_uniquename":"seriesNode"
}
,
{ "caption":"Flächenfarbe",
"prop_uniquename":"fill_static",
"explanation":"Nur für Grafikelemente Flächen und Balken. Füllfarbe.",
"prop_default":"",
"prop_unit":"",
"is_generic":"0",
"static_values":"",
"is_mandatory":"0",
"input_type_uniquename":"COLOR",
"property_group_uniquename":"STYLE",
"sortnr":"",
"range_from":"",
"range_to":"",
"prop_value_type":"string",
"variable_name":"fill",
"parent_property_uniquename":"seriesNode"
}
]
/>
<@create_temp_tables />
<@fill_viz_properties />

79
src-modules/module/viz/schluesseltabellen/viz_properties_plot_line_bar_boxplot_fuellen.sql

@ -0,0 +1,79 @@ @@ -0,0 +1,79 @@
--Freemarker Template
<#include "SQL_lingua_franca"/>
<#include "SuperX_general"/>
<#include "VIZ-Makros"/>
<sqlvars>
<sqlvar name="renderer">
select tid from viz_renderer where uniquename='plot';
</sqlvar>
</sqlvars>
<#assign viz_types = [
{"uniquename":"bar_x", "caption":"Balkendiagramm (horizontal)",
"orientation":"H",
"description":"Horizontales Balkendiagramm",
"explanation":""},
{"uniquename":"bar_y", "caption":"Balkendiagramm (vertikal)",
"orientation":"V",
"description":"Vertikales Balkendiagramm",
"explanation":""},
{"uniquename":"line", "caption":"Linien (vertikal)",
"orientation":"V",
"description":"Vertikales Liniendiagramm",
"explanation":""},
{"uniquename":"area_x", "caption":"Flächendiagramm (horizontal)",
"orientation":"H",
"description":"Horizontales Flächendiagramm",
"explanation":""},
{"uniquename":"area_y", "caption":"Flächendiagramm (vertikal)",
"orientation":"V",
"description":"Vertikales Flächendiagramm",
"explanation":""},
{"uniquename":"dot", "caption":"Punkte (vertikal)",
"orientation":"V",
"description":"Vertikales Punktdiagramm",
"explanation":""},
{"uniquename":"box_x", "caption":"Boxplot (horizontal)",
"orientation":"H",
"description":"Horizontales Boxplot",
"explanation":""},
{"uniquename":"box_y", "caption":"Boxplot (vertikal)",
"orientation":"V",
"description":"Vertikales Boxplot",
"explanation":""},
{"uniquename":"text", "caption":"Wertelabel (vertikal)",
"orientation":"V",
"description":"Wertelabel für vertikales Diagramm",
"explanation":""}
]
/>
<#assign viz_type_properties = [
{"viz_property_uniquename":"x",
"is_mandatory":"1"},
{"viz_property_uniquename":"y",
"is_mandatory":"1"},
{"viz_property_uniquename":"stroke",
"is_mandatory":"0"},
{"viz_property_uniquename":"stroke_static",
"is_mandatory":"0"},
{"viz_property_uniquename":"fill_static",
"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>

1
src-modules/module/viz/schluesseltabellen/viz_type_plot_fuellen.sql

@ -1,3 +1,4 @@ @@ -1,3 +1,4 @@
--OBSOLET!!!
--Freemarker Template
<#include "SQL_lingua_franca"/>
<#include "SuperX_general"/>

263
superx/edit/viz/viz_chart_bearbeiten.jsp

@ -0,0 +1,263 @@ @@ -0,0 +1,263 @@
<%@ taglib uri="/WEB-INF/dbforms.tld" prefix="db" %>
<%@page pageEncoding="utf-8" contentType="text/html; charset=UTF-8" %>
<html xmlns:jsp="http://www.java.com/jsp" xmlns:db="http://www.wap-force.com/dbforms"><!--Automatically generated by module_scripts_create.x (SuperX)-->
<head xmlns:sx="http://memtext.de">
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<meta content="0" http-equiv="expires">
<LINK href="/superx/style/superx.css" type="text/css" REL="stylesheet">
<LINK href="/superx/xml/superxml_html.css" type="text/css" REL="stylesheet">
<LINK href="/superx/xml/maske_html.css" type="text/css" REL="stylesheet">
<LINK href="/superx/style/dbforms_40.css" type="text/css" REL="stylesheet">
<title>Maske Diagrammenw&uuml;rfe bearbeiten</title>
<%
String renderer_id = request.getParameter("renderer_id");
String renderer = request.getParameter("renderer");
if(renderer != null && (renderer_id == null || renderer_id.equals("")))
{
renderer_id=renderer.equals("plot")?"2":(renderer.equals("d3js")?"1":"3");
}
%>
<script type="text/javascript">
var djConfig = {isDebug: false };
//djConfig.debugAtAllCosts = true;
</script><script src="/superx/xml/js/dojo/dojo.js" type="text/javascript">&nbsp;</script><script type="text/javascript">
dojo.require("dojo.widget.Dialog");
dojo.require("dojo.widget.Button");
dojo.require("dojo.widget.Tooltip");
dojo.require("dojo.string.common");
dojo.hostenv.writeIncludes();
</script><script src="/superx/xml/js/memtext/dbforms.js" type="text/javascript">&nbsp;</script>
<db:base/>
</head>
<script language="javascript"
src=<%= "\"" +request.getContextPath() + "/dbformslib/jscal/calendar.js\""%>>
</script>
<script language="javascript">
function initPage()
{
var renderer_id="<%=renderer_id %>";
var referrerWindow=window.opener;
var referrerDocument=referrerWindow.document;
var targetField=referrerDocument.getElementById("viz_chart_variant").value;
document.getElementById(targetField).innerHTML=referrerDocument.getElementById("chartModelSrcCode").innerHTML;
document.getElementById("key_viz_chartrenderer_id").value=renderer_id;
}
</script>
<body class="clsPageBody" onLoad="initPage()"><%@ page import ="java.util.Hashtable" %>
<%
//HttpSession session=request.getSession(true);
if (request.getCharacterEncoding() == null)
request.setCharacterEncoding("UTF-8");
Object userobject=request.getSession().getAttribute("UserID");
String userid;
String filter="";
String sql="";
if(userobject == null)
{
%>
<jsp:forward page="/edit/not_authenticated.htm"/>
<%
}
else
userid=userobject.toString();
Object mandantobject=request.getSession().getAttribute("MandantenID");
String mandantenid="";
if(mandantobject != null)
mandantenid=mandantobject.toString();
//der superx-Default-Mandant ist bei dbforms ein Leerstring
if(mandantenid.equals("default"))
mandantenid="";
String db_form_name="viz_chart";
String erlaubt="0";
%>
<%@ include file="/edit/check_authentication.inc" %>
<%
if(erlaubt.equals("0"))
{
%>
<jsp:forward page="/edit/not_authorized.htm"/>
<%
}
String keyfieldsused="false";
Object kf=request.getParameter("keyfieldsused");
if(kf != null)
keyfieldsused=kf.toString();
%>
<div style="margin: 0px; padding: 0px; overflow: hidden; width: 100%;" id="menuCaption">
<span class="menuCaptionTitle" id="menuCaptionTitle">Diagrammenw&uuml;rfe bearbeiten. </span><img border="0" height="18px" alt="Erl&auml;uterung" src="/superx/images/information.svg"><span style="display:none" connectId="menuCaption" dojoType="tooltip">In diesem Formular k&ouml;nnen Sie Diagramme verwalten.</span>
</div>
<%
String tid = request.getParameter("tid");
filter +="tid="+tid;
%>
<%
String created_by = request.getParameter("created_by");
if(created_by != null && !created_by.equals("null")){
filter +=",created_by="+created_by;
}
%>
<db:dbform tableName="viz_chart" maxRows="1" autoUpdate="false"
captionResource="true" multipart="false"
followUp="/edit/viz/viz_chart_edit.jsp"
filter="<%= filter %>" orderBy="caption"
dbConnectionName="<%= mandantenid %>" ><input type="hidden" name="${_csrf.parameterName}" value="${_csrf.token}"/><db:header/>
<db:errors/>
<db:body allowNew="true">
<table border="0" align="right" cellpadding="0" cellspacing="0">
<tr>
<td class="naviBtn">
<db:updateButton styleClass="clsButtonStyle" style="height:18px" alt="button.update" src="../../images/save.svg" flavor="image" id="db_updateButton"/></td><td class="naviBtn">
<db:navFirstButton styleClass="clsButtonStyle" style="height:18px" caption="button.nav.first" alt="button.nav.first" src="../../images/resultset_first.svg" flavor="image" id="db_navFirstButton"/></td><td class="naviBtn">
<db:navPrevButton styleClass="clsButtonStyle" style="height:18px" alt="button.nav.previous" src="../../images/resultset_previous.svg" flavor="image" id="db_navPrevButton"/></td><td class="naviBtn">
<db:navNextButton styleClass="clsButtonStyle" style="height:18px" alt="button.nav.next" src="../../images/resultset_next.svg" flavor="image" id="db_navNextButton"/></td><td class="naviBtn">
<db:navLastButton styleClass="clsButtonStyle" style="height:18px" alt="button.nav.last" src="../../images/resultset_last.svg" flavor="image" id="db_navLastButton"/></td><td class="naviBtn">
<db:deleteButton confirmMessage="button.delete.confirm" styleClass="clsButtonStyle" style="height:18px" alt="button.delete" src="../../images/delete.svg" id="db_deleteButton" flavor="image"/></td><td class="naviBtn"><span connectId="copy1" dojoType="tooltip">Datensatz kopieren. Mit Mausklick auf diesen Button kopieren Sie den aktuellen Datensatz. Zum Einf&uuml;gen des neuen Datensatzes klicken Sie dann auf das H&auml;kchen-Symbol rechts neben bzw. unter mir.</span>
<db:navCopyButton styleClass="clsButtonStyle" style="height:18px" showAlwaysInFooter="false" alt="button.nav.copy" src="../../images/copy.svg" id="copy1" flavor="image"/></td><td class="naviBtn"><span connectId="new1" dojoType="tooltip">Neuen Datensatz erzeugen. Mit Mausklick auf diesen Button geht das Formular bzw. Unterformular in den Einf&uuml;gemodus, alle vorhandenen Datens&auml;tze werden ausgeblendet. Zum Einf&uuml;gen des neuen Datensatzes klicken Sie dann auf das H&auml;kchen-Symbol rechts neben bzw. unter mir.</span>
<db:navNewButton styleClass="clsButtonStyle" style="height:18px" showAlwaysInFooter="false" alt="button.nav.new" src="../../images/context_add.svg" id="new1" flavor="image"/></td><td class="naviBtn"><span connectId="ins1" dojoType="tooltip">Datensatz einf&uuml;gen. Wenn Sie einen neuen Datensatz erzeugt haben, k&ouml;nnen Sie diesen mit diesem Button speichern.</span>
<db:insertButton showAlways="false" style="height:18px" styleClass="clsButtonStyle" alt="Datensatz einf&uuml;gen" src="../../images/circle_tick.svg" id="ins1" flavor="image"/></td><td class="naviBtn"><input type="hidden" name="keyfieldsused" value="<%= keyfieldsused %>" /><a onclick="maskeTogglekeyfields()" title="Schl&uuml;sselfelder an/aus"><img alt="Schl&uuml;sselfelder an/aus" src="../../images/key.svg" border="0"></a></td>
</tr>
</table>
<p>&nbsp;</p>
<hr>
<p>
<input type="hidden" name="tid" value="<%= tid %>" />
<input type="hidden" name="created_by" value="<%= created_by %>" />
</p>
<table class="db_form_table" cellspacing="0" cellpadding="0" width="100%" border="0">
<td>
<table cellspacing="0" cellpadding="0" width="100%" border="0">
<tr>
<td class="db_label">tid</td><td>
<db:label nullFieldValue="" fieldName="tid"/></td>
</tr>
<tr>
<td class="db_label">
<db:message key="Bezeichnung"/></td><td align="left">
<div id="fld_caption">
<db:textField nullFieldValue="" styleClass="clsInputStyle" onBlur="" maxlength="255" size="50" id="inp_viz_chartcaption" fieldName="caption"/>
</div>
</td>
</tr>
<tr>
<td class="db_label">
<db:message key="Unique Name"/></td><td align="left">
<div id="fld_uniquename">
<db:textField nullFieldValue="" styleClass="clsInputStyle" onBlur="" maxlength="255" size="50" id="inp_viz_chartuniquename" fieldName="uniquename"/>
</div>
</td>
</tr>
<tr>
<td class="db_label">
<db:message key="Beschreibung"/></td><td align="left">
<div id="fld_description">
<db:textArea nullFieldValue="" onBlur="" styleClass="editform" wrap="virtual" rows="6" cols="80" fieldName="description"/>
</div>
</td>
</tr>
<tr>
<td class="db_label">
<db:message key="Maske"/></td><td align="left">
<div id="fld_maskeninfo_id">
<input onblur="updateSelect(this)" style="display:none" size="10" name="key_viz_chartmaskeninfo_id" class="schluesselfeld" type="text">
<db:select id="inp_viz_chartmaskeninfo_id" styleClass="clsInputStyle" readOnly="false" onChange="updateKeyfield(this)" fieldName="maskeninfo_id" customEntry=",,true"><% sql = "select tid, name from maskeninfo order by name;"; %><db:queryData name="viz_chart_maskeninfo5" query="<%= sql %>" dbConnectionName="<%= mandantenid %>" /> </db:select>
</div>
</td>
</tr>
<tr>
<td class="db_label">
<db:message key="Maskenparameter"/></td><td align="left">
<div id="fld_mask_params">
<db:textArea nullFieldValue="" onBlur="" styleClass="editform" wrap="virtual" rows="6" cols="80" fieldName="mask_params"/>
</div>
</td>
</tr>
<tr>
<td class="db_label">
<db:message key="Renderer"/></td><td align="left">
<div id="fld_renderer_id">
<input onblur="updateSelect(this)" style="display:none" size="10" name="key_viz_chartrenderer_id" class="schluesselfeld" type="text">
<db:select id="inp_viz_chartrenderer_id" styleClass="clsInputStyle" readOnly="false" onChange="updateKeyfield(this)" fieldName="renderer_id" customEntry=",,true"><% sql = "select tid, caption from viz_renderer order by caption;"; %><db:queryData name="viz_chart_viz_renderer3" query="<%= sql %>" dbConnectionName="<%= mandantenid %>" /> </db:select>
</div>
</td>
</tr>
<tr>
<td class="db_label">
<db:message key="Quellcode des Diagramms"/></td><td align="left">
<div id="fld_chartmodel">
<db:textArea nullFieldValue="" onBlur="" styleClass="editform" wrap="virtual" rows="6" cols="80" fieldName="chartmodel" id="chartmodel"/>
</div>
</td>
</tr>
<tr>
<td class="db_label">
<db:message key="Quellcode des Diagramms (Miniatur)"/></td><td align="left">
<div id="fld_chartmodel_miniature">
<db:textArea nullFieldValue="" onBlur="" styleClass="editform" wrap="virtual" rows="6" cols="80" fieldName="chartmodel_miniature" id="chartmodel_miniature"/>
</div>
</td>
</tr>
<tr>
<td class="db_label">
<db:message key="Breite des Diagramms"/></td><td align="left">
<div id="fld_chart_width">
<db:textField nullFieldValue="" onBlur="" styleClass="clsInputStyle" id="inp_viz_chartchart_width" size="6" fieldName="chart_width"/>
</div>
<span style="display:none" connectId="fld_chart_width" dojoType="tooltip">in px</span></td>
</tr>
<tr>
<td class="db_label">
<db:message key="H&ouml;he des Diagramms"/></td><td align="left">
<div id="fld_chart_height">
<db:textField nullFieldValue="" onBlur="" styleClass="clsInputStyle" id="inp_viz_chartchart_height" size="6" fieldName="chart_height"/>
</div>
<span style="display:none" connectId="fld_chart_height" dojoType="tooltip">in px</span></td>
</tr>
<tr>
<td class="db_label">
<db:message key="Breite der Diagramm-Miniatur"/></td><td align="left">
<div id="fld_chart_miniature_width">
<db:textField nullFieldValue="" onBlur="" styleClass="clsInputStyle" id="inp_viz_chartchart_miniature_width" size="6" fieldName="chart_miniature_width"/>
</div>
<span style="display:none" connectId="fld_chart_miniature_width" dojoType="tooltip">in px</span></td>
</tr>
<tr>
<td class="db_label">
<db:message key="H&ouml;he der Diagramm-Miniatur"/></td><td align="left">
<div id="fld_chart_miniature_height">
<db:textField nullFieldValue="" onBlur="" styleClass="clsInputStyle" id="inp_viz_chartchart_miniature_height" size="6" fieldName="chart_miniature_height"/>
</div>
<span style="display:none" connectId="fld_chart_miniature_height" dojoType="tooltip">in px</span></td>
</tr>
<tr>
<td class="db_label">
<db:message key="Grafik aktiv"/></td><td align="left">
<div id="fld_chart_active">
<db:textField nullFieldValue="" onBlur="" styleClass="clsInputStyle" id="inp_viz_chartchart_active" size="6" fieldName="chart_active"/>
</div>
</td>
</tr>
</table>
</td><td align="center" style="padding-left:10px"></td>
</table>
</db:body>
<db:footer/></db:dbform></body>
</html>

55
superx/xml/js/viz/viz_assistent.js

@ -581,6 +581,7 @@ function saveChartElementConfig() @@ -581,6 +581,7 @@ function saveChartElementConfig()
//document.getElementById("vizElementCounter").value=myChartModel.chartElements.length;
renderChart('chartDiv',myChartModel,datasource,title);
updateChartModelCode(myChartModel);
/*var marksArray=new Array();
marksArray[elemID]=Plot.barX(rs_table0,
@ -1006,13 +1007,14 @@ function getPropertyValueFromModel(myChartModel,propUniquename,isCommon,chartEle @@ -1006,13 +1007,14 @@ function getPropertyValueFromModel(myChartModel,propUniquename,isCommon,chartEle
function renderTreeInput(chartProperty,inputId, previousValue)
{
var zs="";
var styleAttr=" style=\"box-shadow: inset 1px 1px 3px #cccccc;border-radius: 5px;\" ";
switch (chartProperty.inputType) {
case "TEXT":
zs="&nbsp;<span class=\"field\"><input type=\"text\" size=\"6\" id=\""+inputId+"\" name=\""+inputId+"\"";
zs="&nbsp;<span class=\"field\"><input type=\"text\"" +styleAttr+"size=\"6\" id=\""+inputId+"\" name=\""+inputId+"\"";
zs+=" value=\""+previousValue +"\" onChange=\"treeInputOnchange('chartDiv',myChartModel);\" /></span>";
break;
case "SELECT":
zs="&nbsp;<span class=\"field\"><select id=\""+inputId+"\" name=\""+inputId+"\"";
zs="&nbsp;<span class=\"field\"><select " +styleAttr+" id=\""+inputId+"\" name=\""+inputId+"\"";
zs+=" value=\""+previousValue +"\" onChange=\"treeInputOnchange('chartDiv',myChartModel);\" >";
zs+=getTreeInputSelectOptions(chartProperty.getValueResultset(),previousValue,chartProperty.isMandatory) ;
@ -1022,6 +1024,11 @@ function renderTreeInput(chartProperty,inputId, previousValue) @@ -1022,6 +1024,11 @@ function renderTreeInput(chartProperty,inputId, previousValue)
zs="&nbsp;<span class=\"field\"><input type=\"checkbox\" id=\""+inputId+"\" name=\""+inputId+"\"";
zs+=" value=\""+previousValue +"\" onChange=\"treeInputOnchange('chartDiv',myChartModel);\"";
zs+=(previousValue)?"checked ":"";
zs+="></input></span>";
break;
case "COLOR":
zs="&nbsp;<span class=\"field\"><input type=\"color\" " +styleAttr+" id=\""+inputId+"\" name=\""+inputId+"\"";
zs+=" value=\""+previousValue +"\" onChange=\"treeInputOnchange('chartDiv',myChartModel);\">";
zs+="</input></span>";
break;
default:
@ -1035,7 +1042,7 @@ function getTreeInputSelectOptions(myValues,selectedValue,isMandatory) @@ -1035,7 +1042,7 @@ function getTreeInputSelectOptions(myValues,selectedValue,isMandatory)
var zs="";
for(var j=0;j < myValues.length;j++)
{
var selectedOption=null;
var defaultSelected=false;
if(myValues[j].value==selectedValue)
{
@ -1062,6 +1069,7 @@ function treeInputOnchange(targetDiv,myChartModel) @@ -1062,6 +1069,7 @@ function treeInputOnchange(targetDiv,myChartModel)
{
updateChartModel();
renderChart(targetDiv,myChartModel);
//TODO SRC-Textarea
}
function renderGeneralChartPropertiesForm(formDiv,myCommonChartProperties,currentChartModel)
@ -1430,7 +1438,7 @@ for(var col=0;col < metadata.length;col++) @@ -1430,7 +1438,7 @@ for(var col=0;col < metadata.length;col++)
{
const thCap = document.createElement("td");
thCap.style="font-family:monospace;font-size:smaller";
const textnode = document.createTextNode("("+metadata[col].colname+")");
const textnode = document.createTextNode("("+col+".: "+metadata[col].colname+")");
thCap.appendChild(textnode);
rowElemSubHeader.appendChild(thCap);
}
@ -1443,7 +1451,7 @@ for(row=0;row<rowcount;row++) @@ -1443,7 +1451,7 @@ for(row=0;row<rowcount;row++)
{
const rowElem = document.createElement("tr");
const tdCap = document.createElement("td");
const textnode = document.createTextNode(row);
const textnode = document.createTextNode(row+1);
tdCap.appendChild(textnode);
rowElem.appendChild(tdCap);
for(var col=0;col < metadata.length;col++)
@ -1675,7 +1683,7 @@ var mySrcDiv=document.getElementById("chartModelsrc"); @@ -1675,7 +1683,7 @@ var mySrcDiv=document.getElementById("chartModelsrc");
else
mySrcDiv.style.display="block";
updateChartModelCode(myChartModel);
}
@ -1756,9 +1764,40 @@ var ergtabelle=document.getElementById(mydiv); @@ -1756,9 +1764,40 @@ var ergtabelle=document.getElementById(mydiv);
selection.removeAllRanges();
}
function showLoadSaveDialog(myDiv)
{
var myLoadSaveDialog= document.getElementById(myDiv);
if(myLoadSaveDialog.style.display=="block")
myLoadSaveDialog.style.display="none";
else
myLoadSaveDialog.style.display="block";
mySelect=document.getElementById("viz_chart_id");
var zs="";
for(var i=0; i < vizCharts.length ; i++){
if(vizCharts[i].maskeninfo_id==currentMaskeninfoId
&& document.getElementById("fldVizRenderer").value==vizCharts[i].renderer)
{
zs+="<option value=\""+vizCharts[i].tid+"\">"+vizCharts[i].caption +"</option>";
}
}
zs+="<option value=\"\">Neue Grafik</option>";
mySelect.innerHTML=zs;
}
function openVizChartDBForm(tid)
{
if(tid==null || tid=="")
{
neu=window.open("../edit/viz/viz_chart_bearbeiten.jsp?renderer="+document.getElementById("fldVizRenderer").value,"_blank","directories=no,location=no,menubar=no,scrollbars=yes,resizable=yes,toolbar=no,width=800,height=600");
}
else
{
var chartObj=vizCharts.find(ch => ch.tid == tid);
var renderer_id= chartObj.renderer_id;
neu=window.open("../edit/viz/viz_chart_bearbeiten.jsp?tid="+tid +"&renderer_id="+renderer_id,"_blank","directories=no,location=no,menubar=no,scrollbars=yes,resizable=yes,toolbar=no,width=800,height=600");
}
return false;
}
function showVizNavTab(nr)
{

39
superx/xml/js/viz/viz_viewer.js

@ -1578,8 +1578,8 @@ function getEchartOptionsBarLine(currentChartModel,myDataset,chartType,titleText @@ -1578,8 +1578,8 @@ function getEchartOptionsBarLine(currentChartModel,myDataset,chartType,titleText
//TODO: bar_x und y abfangen'
var chartTypes = chartType.split(/_/);
var scheme = getChartPropertyValue(currentChartModel.chartPropertiesUsed,"schemeArray");
var myPalette=getSchemeArray(scheme);
var singleColor = getChartPropertyValue(currentChartModel.chartPropertiesUsed,"singleColor");
var myPalette=getPaletteArray(scheme,singleColor);
var orientation=chartTypes[2];
var measure1Axis="y";
var dimension1Axis="x";
@ -1644,6 +1644,7 @@ if(orientation=="x") @@ -1644,6 +1644,7 @@ if(orientation=="x")
xAxis: {
type:xAxisType, //horizontal oder vertikal
name:getChartPropertyValue(currentChartModel.chartPropertiesUsed,"xAxisName"),
nameLocation:getChartPropertyValue(currentChartModel.chartPropertiesUsed,"xAxisNameLocation"),
//type: 'category',
axisLabel: {
inside: false,
@ -1719,7 +1720,8 @@ function getEchartOptionsBarLineSeries(currentChartModel,myDataset,chartType,tit @@ -1719,7 +1720,8 @@ function getEchartOptionsBarLineSeries(currentChartModel,myDataset,chartType,tit
//TODO: bar_x und y abfangen'
var chartTypes = chartType.split(/_/);
var scheme = getChartPropertyValue(currentChartModel.chartPropertiesUsed,"schemeArray");
var myPalette=getSchemeArray(scheme);
var singleColor = getChartPropertyValue(currentChartModel.chartPropertiesUsed,"singleColor");
var myPalette=getPaletteArray(scheme,singleColor);
var subtitleText=getChartPropertyValue(currentChartModel.chartPropertiesUsed,"subtitle");
var xAxisType="category";
var yAxisType="value";
@ -1808,6 +1810,7 @@ var option = { @@ -1808,6 +1810,7 @@ var option = {
//type:'value',
type: yAxisType,
name:getChartPropertyValue(currentChartModel.chartPropertiesUsed,"yAxisName"),
nameLocation:getChartPropertyValue(currentChartModel.chartPropertiesUsed,"xAxisNameLocation"),
axisLabel: {
inside: false,
margin: getChartPropertyValue(currentChartModel.chartPropertiesUsed,"padding_y"),
@ -1871,7 +1874,7 @@ var dimension1Fldname=getChartElementPropertyValueFromModel(currentChartModel,"1 @@ -1871,7 +1874,7 @@ var dimension1Fldname=getChartElementPropertyValueFromModel(currentChartModel,"1
var titleText=getChartPropertyValue(currentChartModel.chartPropertiesUsed,"caption");
var subtitleText=getChartPropertyValue(currentChartModel.chartPropertiesUsed,"subtitle");
var scheme = getChartPropertyValue(currentChartModel.chartPropertiesUsed,"schemeArray");
var myPalette=getSchemeArray(scheme);
var myPalette=getPaletteArray(scheme,"");
var option = {
dataset: {
@ -2021,16 +2024,16 @@ function getCommonChartProperty(name) @@ -2021,16 +2024,16 @@ function getCommonChartProperty(name)
if(document.forms["chartPropertiesForm"] && document.forms["chartPropertiesForm"].elements[name])
{
propertyValue=document.forms["chartPropertiesForm"].elements[name].value;
}
if(propertyValue=="")
{
let prop = commonChartProperties.find(o => o.name === name);
if(prop.defaultValue!="")
{
propertyValue=prop.defaultValue;
}
}
if(propertyValue=="")
{
let prop = commonChartProperties.find(o => o.name === name);
if(prop.defaultValue!="")
{
propertyValue=prop.defaultValue;
}
}
}
/*for (var i=0;i<commonChartProperties.length;i++)
{
if(commonChartProperties[i].name==name && document.forms["chartPropertiesForm"].elements[name])
@ -2330,9 +2333,11 @@ function getColumnCaption(columnName) @@ -2330,9 +2333,11 @@ function getColumnCaption(columnName)
return colCaption;
}
function getSchemeArray(schemeName)
function getPaletteArray(schemeName,singleColor)
{
var schemeArray=new Array();
if(singleColor=="")
{
switch (schemeName) {
case "abgrp":
/*Bachelor: BA blau #374ca und 80 % , LA BA #5e70ba
@ -2385,7 +2390,11 @@ Sonstige: #98b4c9*/ @@ -2385,7 +2390,11 @@ Sonstige: #98b4c9*/
];
break;
}
}
else
{
schemeArray=[ singleColor ];
}
return schemeArray;
}

44
superx/xml/viz_components.xsl

@ -530,6 +530,50 @@ vizPropertyTreeNodes.push(newVizPropertyTreeNode); @@ -530,6 +530,50 @@ vizPropertyTreeNodes.push(newVizPropertyTreeNode);
</xsl:text>
</xsl:for-each>
<xsl:text>
var currentMaskeninfoId=</xsl:text><xsl:value-of select="/ergebnisse/ergebnis[@ordnr='0']/maskenname/@id" /><xsl:text>;
function vizChart(tid,
uniquename,
caption,
renderer,
renderer_id,
maskeninfo_id,
userinfo_id)
{
this.tid=tid;
this.uniquename=uniquename;
this.caption=caption;
this.renderer=renderer;
this.renderer_id=renderer_id;
this.maskeninfo_id=maskeninfo_id;
this.userinfo_id=userinfo_id;
}
var vizCharts=[];
</xsl:text>
<xsl:for-each select="/ergebnisse/ergebnis[@ordnr='0']/ergebniselement/viz_charts/viz_chart">
<xsl:text>
var newVizChart = new vizChart(</xsl:text>
<xsl:value-of select="@tid" /><xsl:text>,
"</xsl:text>
<xsl:value-of select="@uniquename" />
<xsl:text>","</xsl:text>
<xsl:value-of select="@caption" />
<xsl:text>","</xsl:text>
<xsl:value-of select="@renderer" />
<xsl:text>",</xsl:text>
<xsl:value-of select="@renderer_id" />
<xsl:text>,"</xsl:text>
<xsl:value-of select="@maskeninfo_id" />
<xsl:text>","</xsl:text>
<xsl:value-of select="@userinfo_id" />
<xsl:text>");
vizCharts.push(newVizChart);
</xsl:text>
</xsl:for-each>
<xsl:text><![CDATA[
function initPage()
{

128
superx/xml/viz_html_chart.xsl

@ -580,65 +580,7 @@ xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:HtmlUtils="de.superx.util @@ -580,65 +580,7 @@ xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:HtmlUtils="de.superx.util
-->
<!--footer (BF nach unten verschoben)-->
<footer class="card-footer">
<!--<p class="card-footer-item"><button class="button is-link is-outlined is-small" type="submit" onClick="showSaveChartFormDiv('saveChartFormDiv','plot');">Speichern...</button></p>-->
<!--<p class="card-footer-item"><button class="button is-link is-outlined is-small" type="reset" onClick="return resetChartPropertiesForm('plot');">Zurücksetzen</button></p>-->
<div id="saveChartFormDiv" style="display:none">
<form name="saveChart" target="_blank" action="../edit/viz/viz_chart_erzeugen.jsp">
<div class="field is-grouped">
<div class="label-container">
<label class="label is-required is-small"><strong>Vorhandene Grafik</strong></label>
</div>
<div class="field is-active">
<p class="control-new">
<div class="select is-small is-fullwidth">
<select class="maskinputPflicht" id="viz_chart_tid" NAME="viz_chart_tid" tabindex="1" >
<xsl:for-each select="/ergebnisse/ergebnis/ergebniselement/viz_charts/viz_chart">
<option class="maskinput" value="{@tid}"><xsl:value-of select="@caption" /></option>
</xsl:for-each>
</select>
</div>
</p>
</div>
<xsl:call-template name="Infobutton" />
</div>
<div class="field is-grouped">
<div class="label-container">
<label class="label is-required is-small"><strong>oder neuer Schlüssel</strong></label>
</div>
<span class="separator">&#160;</span>
<span class="separator">&#160;</span>
<input class="is-small" type="text" size="10" name="viz_chart_uniquename_new" id="viz_chart_uniquename" value="" />
</div>
<div class="field is-grouped">
<div class="label-container">
<label class="label is-required is-small"><strong>Überschrift</strong></label>
</div>
<span class="separator">&#160;</span>
<span class="separator">&#160;</span>
<input class="is-small" type="text" size="20" name="viz_chart_caption" id="viz_chart_caption" value="" />
</div>
<div class="field is-grouped">
<div class="label-container">
<label class="label is-required is-small"></label>
</div>
<span class="separator">&#160;</span>
<span class="separator">&#160;</span>
<!--<input type="submit" class="button is-link is-outlined is-small" value="Speichern"></input>-->
</div>
</form>
</div>
</footer>
</xsl:template>
<xsl:template name="grafiknutzung">
@ -666,7 +608,7 @@ xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:HtmlUtils="de.superx.util @@ -666,7 +608,7 @@ xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:HtmlUtils="de.superx.util
<div id="chartCanvas"> <!--class="section"-->
<!--<div id="chartCanvasHeader"> </div>-->
<div id="chartDiv2" style="width:800px;height:600px;"> </div>
<div id="chartDiv2" style="width:800px;height:600px;display:none;"> </div>
<!--<div id="chartCanvasFooter"></div>-->
</div>
@ -696,15 +638,69 @@ xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:HtmlUtils="de.superx.util @@ -696,15 +638,69 @@ xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:HtmlUtils="de.superx.util
</div>
</div>
<span class="separator">&#160;</span>
<span class="separator">&#160;</span>
<!-- Aufruf/Anzeige SVG-Quellcode-->
<div class="field is-grouped">
<div class="label-container">
<label class="label is-required is-small"><strong>Grafikdefinition laden/speichern</strong>
<span class="separator">&#160;</span>
<a
onClick="showLoadSaveDialog('showLoadSaveDialogDiv');">
<span class="icon">
<img src="../images/icons/more.svg" title="Laden" />
</span>
</a>
</label>
</div>
</div>
<div id="showLoadSaveDialog"> <!--class="section">-->
<div id="showLoadSaveDialogDiv" style="display:none">
<div class="field is-horizontal">
<div class="field-label is-normal">
<label class="label">Grafikdefinition speichern:</label>
</div>
<div class="field-body">
<div class="field is-narrow">
<p class="control">
<select class="select" name="viz_chart_id" id="viz_chart_id"><option>Keine Auswahl möglich</option></select>
</p>
</div>
<div class="field is-narrow">
<p class="control">
<select class="select" name="viz_chart_variant" id="viz_chart_variant">
<option value="chartmodel">Normalgröße</option>
<option value="chartmodel_miniature">Miniatur</option></select>
</p>
</div>
<div class="field is-narrow">
<p class="control">
<a target="nextedit" onclick="openVizChartDBForm(document.getElementById('viz_chart_id').value)">
<img src="../images/pencil.svg" class="svg_icon" border="0" alt="Bearbeiten" title="Bearbeiten" /></a>
</p>
</div>
</div>
</div>
<!--<div class="field">
<div class="label">Oder neue Grafik: </div><div class="input">
<input name="viz_chart_new_uniquename" id="viz_chart_new_uniquename" type="text" />
Link...
</div>
</div>-->
</div>
</div>
<!--footer (BF eingefügt *** Klärungsbedarf bzgl. notwendiger Buttons)-->
<footer class="card-footer">
<!--<p class="card-footer-item"><button class="button is-link is-outlined is-small" onClick="createChart();">Diagramm-Vorschau</button></p> -->
<p class="card-footer-item"><button class="button is-link is-outlined is-small" type="submit" onClick="copySrcCode('chartSrc');">Kopieren</button></p>
<!--<p class="card-footer-item"><button class="button is-link is-outlined is-small" type="reset">Zurücksetzen</button></p>-->
</footer>
</xsl:template>
<xsl:template name="Infobutton">

Loading…
Cancel
Save