diff options
| author | 2021-02-28 12:26:24 +0100 | |
|---|---|---|
| committer | 2021-02-28 12:26:24 +0100 | |
| commit | 947e918f05d70d5dce4efa4ef403e593581c3fa9 (patch) | |
| tree | e66ef1ffe8a6cc0ffbea1bff1791588f72879637 /p/scripts/stats.js | |
| parent | bf2718cada964fba66d8497592abcb73cb9520ba (diff) | |
Travis: Enforce phpcs line length + whitespace (#3488)
* Update Travis line length
* Also check whitespace in CSS files
* Fix line length ext.php
* More syntax, string templates
* Fix exclude-pattern
* Test JS files as well
Diffstat (limited to 'p/scripts/stats.js')
| -rw-r--r-- | p/scripts/stats.js | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/p/scripts/stats.js b/p/scripts/stats.js index 54ea0e4de..6ca598784 100644 --- a/p/scripts/stats.js +++ b/p/scripts/stats.js @@ -32,7 +32,7 @@ function initStats() { grid: {verticalLines: false}, xaxis: {noTicks: 6, showLabels: false, tickDecimals: 0, min: -30.75, max: -0.25}, yaxis: {min: 0}, - mouse: {relative: true, track: true, trackDecimals: 0, trackFormatter: function(obj) {return numberFormat(obj.y);}} + mouse: {relative: true, track: true, trackDecimals: 0, trackFormatter: function (obj) { return numberFormat(obj.y); }}, }); // Feed per category Flotr.draw(document.getElementById('statsFeedPerCategory'), @@ -42,7 +42,9 @@ function initStats() { pie: {explode: 10, show: true, labelFormatter: function(){return '';}}, xaxis: {showLabels: false}, yaxis: {showLabels: false}, - mouse: {relative: true, track: true, trackDecimals: 0, trackFormatter: function(obj) {return obj.series.label + ' - '+ numberFormat(obj.y) + ' ('+ (obj.fraction * 100).toFixed(1) + '%)';}}, + mouse: {relative: true, track: true, trackDecimals: 0, trackFormatter: function (obj) { + return obj.series.label + ' - ' + numberFormat(obj.y) + ' (' + (obj.fraction * 100).toFixed(1) + '%)'; + }}, legend: {container: document.getElementById('statsFeedPerCategoryLegend'), noColumns: 3} }); // Entry per category @@ -50,10 +52,12 @@ function initStats() { stats.entryByCategory, { grid: {verticalLines: false, horizontalLines: false}, - pie: {explode: 10, show: true, labelFormatter: function(){return '';}}, + pie: {explode: 10, show: true, labelFormatter: function () { return ''; }}, xaxis: {showLabels: false}, yaxis: {showLabels: false}, - mouse: {relative: true, track: true, trackDecimals: 0, trackFormatter: function(obj) {return obj.series.label + ' - '+ numberFormat(obj.y) + ' ('+ (obj.fraction * 100).toFixed(1) + '%)';}}, + mouse: {relative: true, track: true, trackDecimals: 0, trackFormatter: function (obj) { + return obj.series.label + ' - ' + numberFormat(obj.y) + ' (' + (obj.fraction * 100).toFixed(1) + '%)'; + }}, legend: {container: document.getElementById('statsEntryPerCategoryLegend'), noColumns: 3} }); } |
