Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Data label script
#1
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;
};
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)