Data label script - Printable Version +- Forums (https://bdn.bdb.ai) +-- Forum: BDB Knowledge Base (https://bdn.bdb.ai/forumdisplay.php?fid=13) +--- Forum: BDB Dashboards Designer (https://bdn.bdb.ai/forumdisplay.php?fid=43) +---- Forum: BDB Designer Q & A (https://bdn.bdb.ai/forumdisplay.php?fid=16) +---- Thread: Data label script (/showthread.php?tid=370) |
Data label script - neeraja.pattathil@bdb.ai - 12-22-2022 What script can be used to show the data label when the "apply Auto Manipulator" script is used? // in dashboard //---------json for CS by Nmsc DataSet.prototype.updateAutoJson = function (json) { if( this.m_id == 'ComponentID1'){ switch(json.Name){ case "MM5": json.Color='#673AB7'; json.ChartType = "line"; json.PlotType = "point"; json.PlotRadius = "4"; break; default: json.ChartType = "column"; json.PlotType = "point"; json.PlotRadius = "4"; json.DataLabelCustomProperties = { "useFieldColor" : "false", "showDataLabel": "true", "dataLabelTextAlign" : "center", "dataLabelFontColor" : "#c2c2d9", "dataLabelRotation" : "0", "dataLabelFontSize" : "10", "datalabelFontStyle" : "normal", "datalabelFontWeight" : "normal", "datalabelFontFamily" : "'Raleway', sans-serif", "datalabelField" : json.Name, "datalabelPosition" : "Top", "dataLabelUseComponentFormater": true, "datalabelFormaterUnit":"none", "datalabelFormaterPrecision":"default", "datalabelFormaterCurrency":"none", "datalabelFormaterPosition":"suffix" }; } } return json; }; |