diff --git a/Monitor/Pages/SalesAnalyzer.cshtml b/Monitor/Pages/SalesAnalyzer.cshtml
index 2d341a3..84a0393 100644
--- a/Monitor/Pages/SalesAnalyzer.cshtml
+++ b/Monitor/Pages/SalesAnalyzer.cshtml
@@ -394,20 +394,7 @@
.transition().duration(0)
.call(salesChart);
- // Add mouseleave, and mousemove event listeners to hide tooltip
- d3.select('.sales-chart').on('mouseleave', function() {
- d3.select('.nvtooltip').remove();
- });
-
- d3.select('body').on('mousemove', function() {
- var chartBounds = d3.select('.sales-chart')[0][0].getBoundingClientRect();
- var mouseX = d3.event.clientX;
- var mouseY = d3.event.clientY;
-
- if (mouseX < chartBounds.left || mouseX > chartBounds.right || mouseY < chartBounds.top || mouseY > chartBounds.bottom) {
- d3.select('.nvtooltip').remove();
- }
- });
+
nv.utils.windowResize(salesChart.update);
return salesChart;
});
@@ -442,20 +429,7 @@
.transition().duration(0)
.call(cumulativeProfitChart);
- // Add mouseleave, and mousemove event listeners to hide tooltip
- d3.select('.cumulative-profit-chart').on('mouseleave', function() {
- d3.select('.nvtooltip').remove();
- });
-
- d3.select('body').on('mousemove', function() {
- var chartBounds = d3.select('.cumulative-profit-chart')[0][0].getBoundingClientRect();
- var mouseX = d3.event.clientX;
- var mouseY = d3.event.clientY;
-
- if (mouseX < chartBounds.left || mouseX > chartBounds.right || mouseY < chartBounds.top || mouseY > chartBounds.bottom) {
- d3.select('.nvtooltip').remove();
- }
- });
+
nv.utils.windowResize(cumulativeProfitChart.update);
return cumulativeProfitChart;
});
@@ -490,20 +464,6 @@
.transition().duration(0)
.call(TCVChart);
- // Add mouseleave, and mousemove event listeners to hide tooltip
- d3.select('.TCV-chart').on('mouseleave', function() {
- d3.select('.nvtooltip').remove();
- });
-
- d3.select('body').on('mousemove', function() {
- var chartBounds = d3.select('.TCV-chart')[0][0].getBoundingClientRect();
- var mouseX = d3.event.clientX;
- var mouseY = d3.event.clientY;
-
- if (mouseX < chartBounds.left || mouseX > chartBounds.right || mouseY < chartBounds.top || mouseY > chartBounds.bottom) {
- d3.select('.nvtooltip').remove();
- }
- });
nv.utils.windowResize(TCVChart.update);
return TCVChart;
});
@@ -561,20 +521,6 @@
});
- // Add mouseleave, and mousemove event listeners to hide tooltip
- d3.select('.profit-chart').on('mouseleave', function() {
- d3.select('.nvtooltip').remove();
- });
-
- d3.select('body').on('mousemove', function() {
- var chartBounds = d3.select('.profit-chart')[0][0].getBoundingClientRect();
- var mouseX = d3.event.clientX;
- var mouseY = d3.event.clientY;
-
- if (mouseX < chartBounds.left || mouseX > chartBounds.right || mouseY < chartBounds.top || mouseY > chartBounds.bottom) {
- d3.select('.nvtooltip').remove();
- }
- });
nv.utils.windowResize(profitChart.update);
return profitChart;
});
@@ -582,4 +528,34 @@
}
})(jQuery);
+
+
+
}
diff --git a/Monitor/Pages/_get/DashboardBottom.cshtml b/Monitor/Pages/_get/DashboardBottom.cshtml
index 3a972d2..1e6f386 100644
--- a/Monitor/Pages/_get/DashboardBottom.cshtml
+++ b/Monitor/Pages/_get/DashboardBottom.cshtml
@@ -493,33 +493,30 @@