telecomCommon.js
by Lavakumar T
HTML
require([ "dojo/_base/declare",
"dojo/dom-construct",
"dojo/parser",
"dojo/ready",
"dijit/_WidgetBase"],
function (declare, domConstruct, parser, ready, _WidgetBase){
declare ("telecomCommon",[_WidgetBase],{
i : 10,
name : '',
age : 0,
title : '',
displayType:'G',
constructor : function(){
//alert("1.constructor Telecom....");
this.i = 30;
},
postMixInProperties : function(){
console.log("2.postMixInProperties");
this.i = 20;
},
buildRendering : function(){
console.log("3.buildRendering");
fnDataCallback(this.displayType);
this.domNode = domConstruct.create("h3",{innerHTML: this.title});
},
_setNameAttr : function(name){
this.name = name;
},
_setAgeAttr : function(age){
this.age = age;
},
postCreate : function(){
console.log("4.postCreate");
},
startUP : function(){
console.log("5.postCreate");
}
});
});
var fnChart = function (empArray) {
var chart = new CanvasJS.Chart("chartContainer", {
title: {
text: ""
},
data: [{
type: "column",
dataPoints: empArray
}]
});
chart.render();
}
var fnDataUsageChart = function (empArray) {
var chart = new CanvasJS.Chart("chartContainer", {
title: {
text: "Mobile Data Usage"
},
axisY: {
title: "Data Usage (mb)",
valueFormatString: "#0.#,.",
},
data: [{
type: "stackedColumn",
legendText: "AM",
showInLegend: "true",
dataPoints: [
{ y: 11133, label: "29 Oct 2017" },
{ y: 52088, label: "28 Oct 2017" },
{ y: 62200, label: "27 Oct 2017" },
{ y: 90085, label: "26 Oct 2017" },
{ y: 38600, label: "25 Oct 2017" },
{ y: 25400, label: "24 Oct 2017" },
{ y: 33873, label: "23 Oct 2017" },
{ y: 6746, label: "22 Oct 2017" },
{ y: 6582, label: "21 Oct 2017" }
]
},...