TO WRITE
var pointLabel = “”;
var labelFontColor = “#333333”;
var labelFontWeight = “bold”;
var labelBackgroundColor = “#CCCCCC”;
var labelWidth = “0px”;
var labelHeight = “20px”;
var labelFontSize = “20px”;
var labelAlignment = “left”;
var labelMargin = “1px”;
var pointWidth = “73px”;
var pointHeight = “14px”;
var pointFontSize = “13px”;
var pointFontColor = “#000099”;
var pointAlignment = “center”;
var pointMargin = “0px”;
var decimalPlaces = 1;
var minValue = 0.00;
var maxValue = 100.00;
var step = 0.1;
var valueInRange = Math.min(Math.max(value, minValue), maxValue);
var pointBackgroundColor = “#FFFFFF”;
var fieldBorderColor = “#CCCCCC”;
var s = “<label for=”" + point.id + “” style=“color:” + labelFontColor + “; font-weight:” + labelFontWeight + “; background-color:” + labelBackgroundColor + “; width:” + labelWidth + “; height:” + labelHeight + “; font-size: " + labelFontSize + “; text-align: " + labelAlignment + “; margin: " + labelMargin + “”>” + pointLabel + “<input type=“text” id=”” + point.id + “” size=“6” style=“text-align:” + pointAlignment + “; font-weight:bold;background-color:” + pointBackgroundColor + “; width:” + pointWidth + “; height:” + pointHeight + “; font-size: " + pointFontSize + “; color: " + pointFontColor + “; margin: " + pointMargin + “; border: 1px solid " + fieldBorderColor + “” onChange='var v=parseFloat(this.value.replace(”,”,”.”)).toFixed(” + decimalPlaces + “);if(v<” + minValue.toFixed(decimalPlaces) + “){v=” + minValue.toFixed(decimalPlaces) + “;}else if(v>” + maxValue.toFixed(decimalPlaces) + “){v=” + maxValue.toFixed(decimalPlaces) + “;}else{v=Math.round(v/” + step + “)*” + step + “;}mango.view.setPoint(”+ point.id +", “”+ pointComponent.id +"", v);return false;'value=" + valueInRange.toFixed(decimalPlaces).toString().replace(".",",") + " >";
return s;
TO READ
var point_label = “”;
var preffix = “”;
var suffix = “”;
var decimal_places = 3;
var font_size = 16;
var use_bold = true;
var border_color = “#888888”;
var background_color = “#FFFFFF”;
var label_color = “#480f03”;
var values_color = “#444444”;
var label_width = 0;
var label_height = 17;
var label_margin = 2;
var data_width = 73;
var data_height = 14;
var data_margin = 1;
var single_line_mode = true;
var data_alignment = “center”;
var font_family = “Vedrana, Arial, Helvetica, sans-serif”;
var display_value = preffix + value.toFixed(decimal_places) + suffix;
var flex_direction = single_line_mode ? “row” : “column”;
var font_weight = use_bold ? “bold” : “normal”;
var div_id = “data-point” + pointComponent.id;
var s = “”;
s += “
s += “” + point_label + “”;
s += “” + display_value + “”;
s += “
s += “”;
s += “#” + div_id + " {";
s += "background: " + background_color + “;”;
s += “border: 1px solid;”;
s += "border-color: " + border_color + “;”;
s += "font-family: " + font_family + “;”;
s += "font-weight: " + font_weight + “;”;
s += "font-size: " + font_size + “px;”;
s += “display: flex;”;
s += “flex-direction: " + flex_direction + “;”;
s += “justify-content: center;”;
s += “align-items: center;”;
s += “}”;
s += “#” + div_id + " span:first-child {”;
s += “margin-right: " + label_margin + “px;”;
s += “}”;
s += “#” + div_id + " span {”;
s += "margin: 0px " + data_margin + “px;”;
s += “}”;
s += “”;
return s;