Skip to content

Commit 43f23e4

Browse files
author
Jelte Lagendijk
committed
JSHint errors & codestyling
1 parent 055f946 commit 43f23e4

File tree

7 files changed

+22
-22
lines changed

7 files changed

+22
-22
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,17 +95,17 @@ define([
9595
},
9696

9797
_createChart : function (data) {
98-
logger.debug(this.id + "._createChart");
98+
logger.debug(this.id + "._createChart");
9999

100100
if (this._chart) {
101101
this._chart.stop();
102102
this._chart.data.datasets = data.datasets;
103103
this._chart.data.labels = data.labels;
104104
this._chart.update(1000);
105105
this._chart.bindEvents(); // tooltips otherwise won't work
106-
} else {
106+
} else {
107107
this._chart = new this._chartJS(this._ctx, {
108-
type: 'bar',
108+
type: "bar",
109109
data: data,
110110
options: {
111111

src/ChartJS/widgets/Core.js

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -314,34 +314,34 @@ define([
314314
_legendCallback: function (chart) {
315315
logger.debug(this.id + "._legendCallback");
316316
var text = [];
317-
text.push('<ul class="' + chart.id + '-legend chart-legend">');
317+
text.push("<ul class=\"" + chart.id + "-legend chart-legend\">");
318318
for (var i = 0; i < chart.data.datasets.length; i++) {
319-
text.push('<li class="chart-legend_item"><span class="chart-legend_bullet" style="background-color:' + chart.data.datasets[i].backgroundColor + '"></span>');
319+
text.push("<li class=\"chart-legend_item\"><span class=\"chart-legend_bullet\" style=\"background-color:" + chart.data.datasets[i].backgroundColor + "\"></span>");
320320
if (chart.data.datasets[i].label) {
321321
text.push(chart.data.datasets[i].label);
322322
}
323-
text.push('</li>');
323+
text.push("</li>");
324324
}
325-
text.push('</ul>');
325+
text.push("</ul>");
326326

327327
return text.join("");
328328
},
329329

330330
_legendAlternateCallback: function(chart) {
331331
var text = [];
332-
text.push('<ul class="' + chart.id + '-legend chart-legend">');
332+
text.push("<ul class=\"" + chart.id + "-legend chart-legend\">");
333333

334334
if (chart.data.datasets.length) {
335335
for (var i = 0; i < chart.data.datasets[0].data.length; ++i) {
336-
text.push('<li class="chart-legend_item"><span class="chart-legend_bullet" style="background-color:' + chart.data.datasets[0].backgroundColor[i] + '"></span>');
336+
text.push("<li class=\"chart-legend_item\"><span class=\"chart-legend_bullet\" style=\"background-color:" + chart.data.datasets[0].backgroundColor[i] + "\"></span>");
337337
if (chart.data.labels[i]) {
338338
text.push(chart.data.labels[i]);
339339
}
340-
text.push('</li>');
340+
text.push("</li>");
341341
}
342342
}
343343

344-
text.push('</ul>');
344+
text.push("</ul>");
345345
return text.join("");
346346
},
347347

@@ -390,7 +390,7 @@ define([
390390
hoverBackgroundColor: []
391391
}
392392
]
393-
}
393+
};
394394

395395
for (var j = 0; j < data.length; j++) {
396396
_chartData.labels.push(data[j].label);
@@ -488,7 +488,7 @@ define([
488488
return "rgba(" + result.r + "," + result.g + "," + result.b + "," + alpha + ")";
489489
}
490490
} else {
491-
logger.warn('Empty hex color!');
491+
logger.warn("Empty hex color!");
492492
}
493493
return "rgba(220,220,220," + alpha + ")";
494494
},
@@ -501,9 +501,9 @@ define([
501501
guids: []
502502
};
503503

504-
if (obj == null) {
505-
obj = this._data.object;
506-
}
504+
if (obj === null) {
505+
obj = this._data.object;
506+
}
507507

508508
if (obj && obj.getGuid()) {
509509
_params.guids = [obj.getGuid()];

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ define([
9696
this._chart.destroy();
9797
}
9898
this._chart = new this._chartJS(this._ctx, {
99-
type: 'doughnut',
99+
type: "doughnut",
100100
data: this._createDataSets(data),
101101
options: {
102102

@@ -140,7 +140,7 @@ define([
140140
// maintainAspectRatio
141141
maintainAspectRatio : this.maintainAspectRatio,
142142

143-
//Number - The percentage of the chart that we cut out of the middle
143+
//Number - The percentage of the chart that we cut out of the middle
144144
cutoutPercentage : this.percentageInnerCutout,
145145

146146
// Custom tooltip?

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ define([
116116
this._chart.data.labels = data.labels;
117117
this._chart.update(1000);
118118
this._chart.bindEvents(); // tooltips otherwise won't work
119-
} else {
119+
} else {
120120

121121
this._chart = new this._chartJS(this._ctx, {
122122
type: "line",

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ define([
105105
this._chart.data.labels = data.labels;
106106
this._chart.update(1000);
107107
this._chart.bindEvents(); // tooltips otherwise won't work
108-
} else {
108+
} else {
109109

110110
this._chart = new this._chartJS(this._ctx, {
111111
type: "radar",

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,10 @@ define([
104104
this._chart.data.labels = data.labels;
105105
this._chart.update(1000);
106106
this._chart.bindEvents(); // tooltips otherwise won't work
107-
} else {
107+
} else {
108108

109109
this._chart = new this._chartJS(this._ctx, {
110-
type: 'bar',
110+
type: "bar",
111111
data: data,
112112
options: {
113113

test/widgets/ChartJS.mpk

-30 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)