Skip to content

Commit 7a7b4fa

Browse files
author
Jelte Lagendijk
committed
Code styling
1 parent 87f2678 commit 7a7b4fa

7 files changed

Lines changed: 68 additions & 81 deletions

File tree

src/ChartJS/widgets/BarChart/widget/BarChart.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,4 @@ define([
184184
});
185185
});
186186

187-
require(["ChartJS/widgets/BarChart/widget/BarChart"], function () {
188-
"use strict";
189-
});
187+
require(["ChartJS/widgets/BarChart/widget/BarChart"]);

src/ChartJS/widgets/DoughnutChart/widget/DoughnutChart.js

Lines changed: 30 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,20 @@ define([
55
"dojo/query",
66
"dojo/on",
77
"dojo/html"
8-
], function (declare, Core, lang, domQuery, on, html) {
8+
], function(declare, Core, lang, domQuery, on, html) {
99
"use strict";
1010

11-
return declare("ChartJS.widgets.DoughnutChart.widget.DoughnutChart", [ Core ], {
11+
return declare("ChartJS.widgets.DoughnutChart.widget.DoughnutChart", [Core], {
1212

1313
_chartType: "doughnut",
1414

15-
_processData : function () {
15+
_processData: function() {
1616
logger.debug(this.id + "._processData");
1717
var sets = [],
1818
chartData = [],
1919
points = null,
2020
set = {
21-
points : []
21+
points: []
2222
},
2323
color = "",
2424
highlightcolor = "",
@@ -40,18 +40,18 @@ define([
4040

4141
label = set.dataset.get(this.datasetlabel);
4242
point = {
43-
label : label,
43+
label: label,
4444
backgroundColor: (this.seriesColorReduceOpacity) ? this._hexToRgb(color, "0.5") : color,
4545
hoverBackgroundColor: (this.seriesColorReduceOpacity) ? this._hexToRgb(color, "0.75") : highlightcolor,
46-
value : +(set.dataset.get(this.seriesylabel))
46+
value: +(set.dataset.get(this.seriesylabel))
4747
};
4848

4949
chartData.push(point);
5050
this._activeDatasets.push({
5151
obj: set.dataset,
52-
dataset : point,
53-
idx : j,
54-
active : true
52+
dataset: point,
53+
idx: j,
54+
active: true
5555
});
5656
}
5757

@@ -60,9 +60,9 @@ define([
6060
this._createLegend(true);
6161
},
6262

63-
_loadData : function () {
63+
_loadData: function() {
6464
logger.debug(this.id + "._loadData");
65-
this._executeMicroflow(this.datasourcemf, lang.hitch(this, function (objs) {
65+
this._executeMicroflow(this.datasourcemf, lang.hitch(this, function(objs) {
6666
var obj = objs[0], // Chart object is always only one.
6767
j = null,
6868
dataset = null;
@@ -72,17 +72,17 @@ define([
7272

7373
// Retrieve datasets
7474
mx.data.get({
75-
guids : obj.get(this._dataset),
76-
callback : lang.hitch(this, function (datasets) {
75+
guids: obj.get(this._dataset),
76+
callback: lang.hitch(this, function(datasets) {
7777
var set = null;
7878
this._data.datasets = [];
7979

8080
for (j = 0; j < datasets.length; j++) {
8181
dataset = datasets[j];
8282

8383
set = {
84-
dataset : dataset,
85-
sorting : +(dataset.get(this.datasetsorting))
84+
dataset: dataset,
85+
sorting: +(dataset.get(this.datasetsorting))
8686
};
8787
this._data.datasets.push(set);
8888
}
@@ -93,7 +93,7 @@ define([
9393

9494
},
9595

96-
_createChart : function (data) {
96+
_createChart: function(data) {
9797
logger.debug(this.id + "._createChart");
9898
if (this._chart !== null) {
9999
this._chart.destroy();
@@ -104,34 +104,34 @@ define([
104104
options: this._chartOptions({
105105

106106
elements: {
107-
arc: {
108-
//String - The colour of each segment stroke
109-
borderColor: this.segmentStrokeColor,
110-
//Number - The width of each segment stroke
111-
borderWidth: this.segmentShowStroke ? this.segmentStrokeWidth : 0
112-
}
107+
arc: {
108+
//String - The colour of each segment stroke
109+
borderColor: this.segmentStrokeColor,
110+
//Number - The width of each segment stroke
111+
borderWidth: this.segmentShowStroke ? this.segmentStrokeWidth : 0
112+
}
113113
},
114114

115115
//Number - Amount of animation steps
116-
animationSteps : this.animationSteps,
116+
animationSteps: this.animationSteps,
117117

118118
//String - Animation easing effect
119-
animationEasing : this.animationEasing,
119+
animationEasing: this.animationEasing,
120120

121121
//Boolean - Whether we animate the rotation of the Doughnut
122-
animateRotate : this.animateRotate,
122+
animateRotate: this.animateRotate,
123123

124124
//Boolean - Whether we animate scaling the Doughnut from the centre
125-
animateScale : this.animateScale,
125+
animateScale: this.animateScale,
126126

127-
legendCallback : this._legendAlternateCallback,
127+
legendCallback: this._legendAlternateCallback,
128128

129129
//Number - The percentage of the chart that we cut out of the middle
130-
cutoutPercentage : this.percentageInnerCutout
130+
cutoutPercentage: this.percentageInnerCutout
131131
})
132132
});
133133

134-
this.connect(window, "resize", lang.hitch(this, function () {
134+
this.connect(window, "resize", lang.hitch(this, function() {
135135
this._resize();
136136
}));
137137

@@ -146,6 +146,4 @@ define([
146146
});
147147
});
148148

149-
require(["ChartJS/widgets/DoughnutChart/widget/DoughnutChart"], function () {
150-
"use strict";
151-
});
149+
require(["ChartJS/widgets/DoughnutChart/widget/DoughnutChart"]);

src/ChartJS/widgets/LineChart/widget/LineChart.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,4 @@ define([
228228
});
229229
});
230230

231-
require(["ChartJS/widgets/LineChart/widget/LineChart"], function () {
232-
"use strict";
233-
});
231+
require(["ChartJS/widgets/LineChart/widget/LineChart"]);

src/ChartJS/widgets/PieChart/widget/PieChart.js

Lines changed: 32 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,20 @@ define([
66
"dojo/on",
77
"dojo/html",
88
"dojo/dom-style"
9-
], function (declare, Core, lang, domQuery, on, html, domStyle) {
9+
], function(declare, Core, lang, domQuery, on, html, domStyle) {
1010
"use strict";
1111

12-
return declare("ChartJS.widgets.PieChart.widget.PieChart", [ Core ], {
12+
return declare("ChartJS.widgets.PieChart.widget.PieChart", [Core], {
1313

1414
_chartType: "pie",
1515

16-
_processData : function () {
16+
_processData: function() {
1717
logger.debug(this.id + "._processData");
1818
var sets = [],
1919
chartData = [],
2020
points = null,
2121
set = {
22-
points : []
22+
points: []
2323
},
2424
color = "",
2525
highlightcolor = "",
@@ -40,28 +40,28 @@ define([
4040

4141
label = set.dataset.get(this.datasetlabel);
4242
point = {
43-
label : label,
43+
label: label,
4444
backgroundColor: (this.seriesColorReduceOpacity) ? this._hexToRgb(color, "0.5") : color,
4545
hoverBackgroundColor: (this.seriesColorReduceOpacity) ? this._hexToRgb(color, "0.75") : highlightcolor,
46-
value : +(set.dataset.get(this.seriesylabel))
46+
value: +(set.dataset.get(this.seriesylabel))
4747
};
4848

4949
chartData.push(point);
5050
this._activeDatasets.push({
5151
obj: set.dataset,
52-
dataset : point,
53-
idx : j,
54-
active : true
52+
dataset: point,
53+
idx: j,
54+
active: true
5555
});
5656
}
5757

5858
this._createChart(chartData);
5959
this._createLegend(true);
6060
},
6161

62-
_loadData : function () {
62+
_loadData: function() {
6363
logger.debug(this.id + "._loadData");
64-
this._executeMicroflow(this.datasourcemf, lang.hitch(this, function (objs) {
64+
this._executeMicroflow(this.datasourcemf, lang.hitch(this, function(objs) {
6565
var obj = objs[0], // Chart object is always only one.
6666
j = null,
6767
dataset = null;
@@ -71,17 +71,17 @@ define([
7171

7272
// Retrieve datasets
7373
mx.data.get({
74-
guids : obj.get(this._dataset),
75-
callback : lang.hitch(this, function (datasets) {
74+
guids: obj.get(this._dataset),
75+
callback: lang.hitch(this, function(datasets) {
7676
var set = null;
7777
this._data.datasets = [];
7878

7979
for (j = 0; j < datasets.length; j++) {
8080
dataset = datasets[j];
8181

8282
set = {
83-
dataset : dataset,
84-
sorting : +(dataset.get(this.datasetsorting))
83+
dataset: dataset,
84+
sorting: +(dataset.get(this.datasetsorting))
8585
};
8686
this._data.datasets.push(set);
8787
}
@@ -92,7 +92,7 @@ define([
9292

9393
},
9494

95-
_createChart : function (data) {
95+
_createChart: function(data) {
9696
logger.debug(this.id + "._createChart");
9797
if (this._chart) {
9898
var set = this._createDataSets(data);
@@ -104,34 +104,34 @@ define([
104104
} else {
105105
var chartProperties = {
106106
type: this._chartType,
107-
data: this._createDataSets(data),
107+
data: this._createDataSets(data),
108108
options: this._chartOptions({
109109

110-
elements: {
111-
arc: {
112-
//String - The colour of each segment stroke
113-
borderColor: this.segmentStrokeColor,
114-
//Number - The width of each segment stroke
115-
borderWidth: this.segmentShowStroke ? this.segmentStrokeWidth : 0
116-
}
117-
},
110+
elements: {
111+
arc: {
112+
//String - The colour of each segment stroke
113+
borderColor: this.segmentStrokeColor,
114+
//Number - The width of each segment stroke
115+
borderWidth: this.segmentShowStroke ? this.segmentStrokeWidth : 0
116+
}
117+
},
118118

119119
//Number - Amount of animation steps
120-
animationSteps : this.animationSteps,
120+
animationSteps: this.animationSteps,
121121

122122
//String - Animation easing effect
123-
animationEasing : this.animationEasing,
123+
animationEasing: this.animationEasing,
124124

125125
//Boolean - Whether we animate the rotation of the Doughnut
126-
animateRotate : this.animateRotate,
126+
animateRotate: this.animateRotate,
127127

128128
//Boolean - Whether we animate scaling the Doughnut from the centre
129-
animateScale : this.animateScale,
129+
animateScale: this.animateScale,
130130

131-
legendCallback : this._legendAlternateCallback,
131+
legendCallback: this._legendAlternateCallback,
132132

133133
//cutOut of pie
134-
cutoutPercentage : 0, //always zero for Pie chart
134+
cutoutPercentage: 0, //always zero for Pie chart
135135

136136
})
137137
};
@@ -149,6 +149,4 @@ define([
149149
});
150150
});
151151

152-
require(["ChartJS/widgets/PieChart/widget/PieChart"], function () {
153-
"use strict";
154-
});
152+
require(["ChartJS/widgets/PieChart/widget/PieChart"]);

src/ChartJS/widgets/PolarChart/widget/PolarChart.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,5 @@ define([
186186
}
187187
});
188188
});
189-
require(["ChartJS/widgets/PolarChart/widget/PolarChart"], function () {
190-
"use strict";
191-
});
189+
190+
require(["ChartJS/widgets/PolarChart/widget/PolarChart"]);

src/ChartJS/widgets/RadarChart/widget/RadarChart.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,4 @@ define([
183183
});
184184
});
185185

186-
require(["ChartJS/widgets/RadarChart/widget/RadarChart"], function () {
187-
"use strict";
188-
});
186+
require(["ChartJS/widgets/RadarChart/widget/RadarChart"]);

src/ChartJS/widgets/StackedBarChart/widget/StackedBarChart.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,4 @@ define([
193193
});
194194
});
195195

196-
require(["ChartJS/widgets/StackedBarChart/widget/StackedBarChart"], function () {
197-
"use strict";
198-
});
196+
require(["ChartJS/widgets/StackedBarChart/widget/StackedBarChart"]);

0 commit comments

Comments
 (0)