Skip to content

Commit 80ddffb

Browse files
committed
Renamed analytics to av as analytics creates issues with ad blockers and similar web plugins
1 parent 14246c5 commit 80ddffb

File tree

6 files changed

+36
-36
lines changed

6 files changed

+36
-36
lines changed

app/index.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@
1515
<link rel="stylesheet" href="styles/main.css" />
1616
<!-- endbuild -->
1717

18-
<!-- build:css(.tmp) styles/analytics.min.css -->
18+
<!-- build:css(.tmp) styles/av.min.css -->
1919
<link rel="stylesheet" href="styles/analytics.css" />
2020
<link rel="stylesheet" href="styles/sumoselect.css" />
2121
<!-- endbuild -->
2222

23-
<!-- build:css(.tmp) styles/analytics_plugins.css -->
23+
<!-- build:css(.tmp) styles/av_plugins.css -->
2424
<link href="bower_components/nvd3/nv.d3.min.css" rel="stylesheet" type="text/css">
2525
<!-- endbuild -->
2626

@@ -57,14 +57,14 @@
5757

5858

5959

60-
<!-- build:js scripts/analytics.min.js -->
60+
<!-- build:js scripts/av.min.js -->
6161
<script src="scripts/vendor/jquery.sumoselect.js"></script>
6262
<script src="scripts/vendor/rgbcolor.js"></script>
6363
<script src="scripts/vendor/canvg.js"></script>
6464
<script src="scripts/scatter.js"></script>
6565
<!-- endbuild -->
6666

67-
<!-- build:js scripts/main_analytics.js -->
67+
<!-- build:js scripts/main_av.js -->
6868
<script src="scripts/main.js"></script>
6969
<!-- endbuild -->
7070

app/scripts/scatter.js

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1155,6 +1155,34 @@ scatterPlot.prototype.parallelsPlot = function parallelsPlot(){
11551155
self.render();
11561156
});
11571157

1158+
// Handles a brush event, toggling the display of foreground lines.
1159+
function brushend(parameter) {
1160+
1161+
self.active_brushes = self.parameters.filter(function(p) { return !self.y[p].brush.empty(); });
1162+
self.brush_extents = {};
1163+
self.active_brushes.map(function(p) { self.brush_extents[p] = self.y[p].brush.extent(); });
1164+
var filter = {};
1165+
1166+
var active;
1167+
1168+
_.each(self.data, function(row){
1169+
active = true;
1170+
self.active_brushes.forEach (function(p) {
1171+
filter[p] = self.brush_extents[p];
1172+
if (!(self.brush_extents[p][0] <= row[p] && row[p] <= self.brush_extents[p][1])){
1173+
active = false;
1174+
}
1175+
});
1176+
row["active"] = active ? 1 : 0;
1177+
});
1178+
1179+
self.filterset(filter);
1180+
1181+
1182+
self.render();
1183+
self.parallelsPlot();
1184+
1185+
}
11581186

11591187

11601188
var self = this;
@@ -1359,34 +1387,6 @@ scatterPlot.prototype.parallelsPlot = function parallelsPlot(){
13591387
}));
13601388
}
13611389

1362-
// Handles a brush event, toggling the display of foreground lines.
1363-
function brushend(parameter) {
1364-
1365-
self.active_brushes = self.parameters.filter(function(p) { return !self.y[p].brush.empty(); });
1366-
self.brush_extents = {};
1367-
self.active_brushes.map(function(p) { self.brush_extents[p] = self.y[p].brush.extent(); });
1368-
var filter = {};
1369-
1370-
var active;
1371-
1372-
_.each(self.data, function(row){
1373-
active = true;
1374-
self.active_brushes.forEach (function(p) {
1375-
filter[p] = self.brush_extents[p];
1376-
if (!(self.brush_extents[p][0] <= row[p] && row[p] <= self.brush_extents[p][1])){
1377-
active = false;
1378-
}
1379-
});
1380-
row["active"] = active ? 1 : 0;
1381-
});
1382-
1383-
self.filterset(filter);
1384-
1385-
1386-
self.render();
1387-
self.parallelsPlot();
1388-
1389-
}
13901390

13911391
// Resize method, recalculates position of all elements in svg
13921392
function resize_parallels() {

lib/index.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@
1515
<link rel="stylesheet" href="styles/main.css">
1616
<!-- endbuild -->
1717

18-
<!-- build:css(.tmp) styles/analytics.min.css -->
18+
<!-- build:css(.tmp) styles/av.min.css -->
1919
<link rel="stylesheet" href="styles/analytics.css">
2020
<link rel="stylesheet" href="styles/sumoselect.css">
2121
<!-- endbuild -->
2222

23-
<!-- build:css(.tmp) styles/analytics_plugins.css -->
23+
<!-- build:css(.tmp) styles/av_plugins.css -->
2424
<link href="bower_components/nvd3/nv.d3.min.css" rel="stylesheet" type="text/css">
2525
<!-- endbuild -->
2626

@@ -57,14 +57,14 @@
5757

5858

5959

60-
<!-- build:js scripts/analytics.min.js -->
60+
<!-- build:js scripts/av.min.js -->
6161
<script src="scripts/vendor/jquery.sumoselect.js"></script>
6262
<script src="scripts/vendor/rgbcolor.js"></script>
6363
<script src="scripts/vendor/canvg.js"></script>
6464
<script src="scripts/scatter.js"></script>
6565
<!-- endbuild -->
6666

67-
<!-- build:js scripts/main_analytics.js -->
67+
<!-- build:js scripts/main_av.js -->
6868
<script src="scripts/main.js"></script>
6969
<!-- endbuild -->
7070

0 commit comments

Comments
 (0)