diff --git a/superx/xml/js/viz/viz_functions.js b/superx/xml/js/viz/viz_functions.js index bcffc66..b7f4e62 100644 --- a/superx/xml/js/viz/viz_functions.js +++ b/superx/xml/js/viz/viz_functions.js @@ -368,22 +368,40 @@ function renderForm(formDiv,chartProperties,myCommonChartProperties) //here values, and then: tabElem.appendChild( rowElem); } - /* + for(var k=0;k < myCommonChartProperties.length;k++) + { const rowElem = document.createElement("tr"); const tdCap = document.createElement("td"); - const textnode = document.createTextNode("Breite"); + const textnode = document.createTextNode(myCommonChartProperties[k].caption); tdCap.appendChild(textnode); - const tdInpElem = document.createElement("td"); - const inpElem = document.createElement("input"); - inpElem.id="viz_width"; - inpElem.name="viz_width"; - inpElem.type="text"; - inpElem.value="800"; - tdInpElem.appendChild(inpElem); rowElem.appendChild(tdCap); - rowElem.appendChild(tdInpElem); - tabElem.appendChild(rowElem); - */ + if(myCommonChartProperties[k].inputType==0) + { + //Einfaches Texteingabefeld: + const tdInpElem = document.createElement("td"); + const inpElem = document.createElement("input"); + inpElem.id=myCommonChartProperties[k].name; + inpElem.name=myCommonChartProperties[k].name; + inpElem.type="text"; + inpElem.value=myCommonChartProperties[k].defaultValue; + tdInpElem.appendChild(inpElem); + rowElem.appendChild(tdInpElem); + + } + else + { // Klappmenü: + const tdSelElem = document.createElement("td"); + const selElem = document.createElement("select"); + selElem.name=myCommonChartProperties[k].name; + selElem.id=myCommonChartProperties[k].name; + fillSelectOptions(selElem,myCommonChartProperties[k].getValueResultset(),myCommonChartProperties[k].isMandatory); + tdSelElem.appendChild(selElem); + rowElem.appendChild(tdSelElem); + } + //here values, and then: + tabElem.appendChild( rowElem); + } + myForm.appendChild(tabElem); //TODO: myCommonChartProperties auf separatem TAB @@ -721,19 +739,30 @@ function getChartOptions(categoryDim,measureDim,marksArray,chartOrientationVerti var options; var categoryDim=document.getElementById("dimension1").value; var measureDim=document.getElementById("measure1").value; - var fontSizeDefault=getCommonChartProperty("fontSize"); + var fontSizeDefault=getCommonChartProperty("fontSize")+"pt"; var chartWidth=getCommonChartProperty("chartWidth"); + var myFontFamily=getCommonChartProperty("font-family"); + var myBgColor=getCommonChartProperty("background-color"); + var myColor=getCommonChartProperty("color"); + var marginLeftDefault=chartWidth/5; //20% liner Rand var marginBottomDefault=100; var categoryLabel=getColumnCaption(categoryDim); var measureLabel=getColumnCaption(measureDim); + var styles={ + backgroundColor: myBgColor, + color: myColor, + fontFamily: myFontFamily, + fontSize: fontSizeDefault, + overflow: "visible" + } if(chartOrientationVertical) { options={ marginLeft:marginLeftDefault, marginBottom:marginBottomDefault, - fontSize:fontSizeDefault, + width:chartWidth, x: { tickRotate: -45, label:categoryLabel @@ -743,7 +772,8 @@ function getChartOptions(categoryDim,measureDim,marksArray,chartOrientationVerti grid:true, label: measureLabel }, - marks: marksArray + marks: marksArray, + style: styles } } else @@ -751,7 +781,7 @@ function getChartOptions(categoryDim,measureDim,marksArray,chartOrientationVerti options={ marginLeft:marginLeftDefault, marginBottom:marginBottomDefault, - fontSize:fontSizeDefault, + width:chartWidth, y: { label:categoryLabel }, @@ -760,7 +790,8 @@ function getChartOptions(categoryDim,measureDim,marksArray,chartOrientationVerti grid:true, label: measureLabel }, - marks: marksArray + marks: marksArray, + style: styles } @@ -861,7 +892,13 @@ function getCommonChartProperty(name) for (var i=0;i @@ -117,39 +122,65 @@ padding:3px; -
+
@@ -1194,7 +1225,7 @@ rs.push(new dataRow(
-
+
@@ -1239,7 +1270,7 @@ rs.push(new dataRow(
-
+
@@ -1249,7 +1280,7 @@ rs.push(new dataRow(
-
+
@@ -1273,13 +1304,13 @@ rs.push(new dataRow(
- +
-
+
@@ -1290,7 +1321,7 @@ rs.push(new dataRow(
-
+