[Libreoffice-commits] online.git: loleaflet/admin loleaflet/package.json

gokaysatir (via logerrit) logerrit at kemper.freedesktop.org
Thu Jun 4 19:21:55 UTC 2020


 loleaflet/admin/src/AdminSocketAnalytics.js |   29 ++++++++++------------------
 loleaflet/package.json                      |    2 -
 2 files changed, 12 insertions(+), 19 deletions(-)

New commits:
commit 9d0fc3801d1b5aeb24b7e0401ceeb9f1ac5d86ed
Author:     gokaysatir <gokaysatir at collabora.com>
AuthorDate: Thu Jun 4 21:25:43 2020 +0300
Commit:     Henry Castro <hcastro at collabora.com>
CommitDate: Thu Jun 4 21:21:37 2020 +0200

    leaflet: update d3 package.
    
    Change-Id: I3afe1021edf9e77ff7a62de0a0d4478c974af57b
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/95534
    Tested-by: Jenkins
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Henry Castro <hcastro at collabora.com>

diff --git a/loleaflet/admin/src/AdminSocketAnalytics.js b/loleaflet/admin/src/AdminSocketAnalytics.js
index e965fc62e..d4fa1a149 100644
--- a/loleaflet/admin/src/AdminSocketAnalytics.js
+++ b/loleaflet/admin/src/AdminSocketAnalytics.js
@@ -97,21 +97,20 @@ var AdminSocketAnalytics = AdminSocketBase.extend({
 		else if (option === 'net')
 			data = this._sentStatsData.concat(this._recvStatsData);
 
-		xScale = d3.scale.linear().range([this._graphMargins.left, this._graphWidth - this._graphMargins.right]).domain([d3.min(data, function(d) {
+		xScale = d3.scaleLinear().range([this._graphMargins.left, this._graphWidth - this._graphMargins.right]).domain([d3.min(data, function(d) {
 			return d.time;
 		}), d3.max(data, function(d) {
 			return d.time;
 		})]);
 
 
-		yScale = d3.scale.linear().range([this._graphHeight - this._graphMargins.bottom, this._graphMargins.top]).domain([d3.min(data, function(d) {
+		yScale = d3.scaleLinear().range([this._graphHeight - this._graphMargins.bottom, this._graphMargins.top]).domain([d3.min(data, function(d) {
 			return d.value;
 		}), d3.max(data, function(d) {
 			return d.value;
 		})]);
 
-		d3XAxis = d3.svg.axis()
-			.scale(xScale)
+		d3XAxis = d3.axisBottom(xScale)
 			.tickFormat(function(d) {
 				d = Math.abs(d / 1000);
 				var sUnit = 0;
@@ -128,49 +127,43 @@ var AdminSocketAnalytics = AdminSocketBase.extend({
 					return d + units[i];
 			});
 
-		d3Line = d3.svg.line()
+		d3Line = d3.line()
 			.x(function(d) {
 				return xScale(d.time);
 			})
 			.y(function(d) {
 				return yScale(d.value);
 			})
-			.interpolate('monotone');
+			.curve(d3.curveMonotoneX);
 
 		if (option === 'mem') {
 			this._xMemScale = xScale;
 			this._yMemScale = yScale;
 			this._d3MemXAxis = d3XAxis;
-			this._d3MemYAxis = d3.svg.axis()
-				.scale(this._yMemScale)
+			this._d3MemYAxis = d3.axisLeft(this._yMemScale)
 				.tickFormat(function (d) {
 					return Util.humanizeMem(d);
-				})
-				.orient('left');
+				});
 			this._d3MemLine = d3Line;
 		}
 		else if (option === 'cpu') {
 			this._xCpuScale = xScale;
 			this._yCpuScale = yScale;
 			this._d3CpuXAxis = d3XAxis;
-			this._d3CpuYAxis = d3.svg.axis()
-				.scale(this._yCpuScale)
+			this._d3CpuYAxis = d3.axisLeft(this._yCpuScale)
 				.tickFormat(function (d) {
 					return d + '%';
-				})
-				.orient('left');
+				});
 			this._d3CpuLine = d3Line;
 		}
 		else if (option === 'net') {
 			this._xNetScale = xScale;
 			this._yNetScale = yScale;
 			this._d3NetXAxis = d3XAxis;
-			this._d3NetYAxis = d3.svg.axis()
-				.scale(this._yNetScale)
+			this._d3NetYAxis = d3.axisLeft(this._yNetScale)
 				.tickFormat(function (d) {
 					return Util.humanizeMem(d/1000) + '/sec';
-				})
-				.orient('left');
+				});
 			this._d3NetSentLine = d3Line;
 			this._d3NetRecvLine = d3Line;
 
diff --git a/loleaflet/package.json b/loleaflet/package.json
index 044b0836b..67120b699 100644
--- a/loleaflet/package.json
+++ b/loleaflet/package.json
@@ -7,7 +7,7 @@
     "autolinker": "3.14.1",
     "browserify": "16.5.1",
     "browserify-css": "0.15.0",
-    "d3": "3.5.17",
+    "d3": "5.16.0",
     "eslint": "3.0.0",
     "hammerjs": "2.0.8",
     "jquery": "2.2.4",


More information about the Libreoffice-commits mailing list