From 2a15184607b83d67805d626e12981060554a788f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 9 Dec 2024 23:04:54 +0000 Subject: [PATCH 1/2] Bump highcharts from 11.4.8 to 12.0.2 Bumps [highcharts](https://github.com/highcharts/highcharts-dist) from 11.4.8 to 12.0.2. - [Commits](https://github.com/highcharts/highcharts-dist/compare/v11.4.8...v12.0.2) --- updated-dependencies: - dependency-name: highcharts dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index c19102f..6d6f3ea 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,7 +10,7 @@ "license": "MIT", "dependencies": { "bootstrap": "^5.3.2", - "highcharts": "^11.4.8" + "highcharts": "^12.0.2" }, "devDependencies": { "@playwright/test": "^1.46.1", @@ -1371,9 +1371,9 @@ } }, "node_modules/highcharts": { - "version": "11.4.8", - "resolved": "https://registry.npmjs.org/highcharts/-/highcharts-11.4.8.tgz", - "integrity": "sha512-5Tke9LuzZszC4osaFisxLIcw7xgNGz4Sy3Jc9pRMV+ydm6sYqsPYdU8ELOgpzGNrbrRNDRBtveoR5xS3SzneEA==" + "version": "12.0.2", + "resolved": "https://registry.npmjs.org/highcharts/-/highcharts-12.0.2.tgz", + "integrity": "sha512-DKZFNn2Mk3EUmOfJIvIgPqBjUoKDkDW9WY1nT9zrhfB9SSyg5yVbVEFrw267C4+Hzg4U1H/0i0Z6S3VYJwg6qQ==" }, "node_modules/hosted-git-info": { "version": "2.8.9", diff --git a/package.json b/package.json index 1725937..6a18806 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "private": true, "dependencies": { "bootstrap": "^5.3.2", - "highcharts": "^11.4.8" + "highcharts": "^12.0.2" }, "devDependencies": { "@playwright/test": "^1.46.1", From 8c01befb1c2d38975bf9fdd8a8f30a06a14c509f Mon Sep 17 00:00:00 2001 From: Christoph Massmann Date: Tue, 10 Dec 2024 12:57:20 +0100 Subject: [PATCH 2/2] fixed issues with highcharts v12 --- src/main.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/main.ts b/src/main.ts index 6b5b82e..4c39293 100644 --- a/src/main.ts +++ b/src/main.ts @@ -173,9 +173,11 @@ function createChart(chartDataTree: Tree): Highcharts.Chart { align: 'right', padding: 30, nodeFormatter: function() { - const point = this as any; - const percentage = 'linksTo' in point && point.linksTo[0] ? (point.sum / point.linksTo[0].fromNode.sum) * 100 : null; - return this.point.name + ": " + numberFormat(('getSum' in this.point ? (this.point as any).getSum() : 0)) + " " + (percentage ? "" + Math.round(percentage) + "% " : ""); + const point = this as Highcharts.Point; + const sum = 'getSum' in this ? (this as any).getSum() : 0; + const percentage = 'linksTo' in point && point.linksTo[0] ? (sum / point.linksTo[0].fromNode.sum) * 100 : null; + + return point.name + ": " + numberFormat(sum) + " " + (percentage ? "" + Math.round(percentage) + "% " : ""); } }, tooltip: { @@ -186,7 +188,7 @@ function createChart(chartDataTree: Tree): Highcharts.Chart { }, // tooltip for node nodeFormatter: function() { - const point = this as any; + const point = this as Highcharts.Point; let totalWeight = 0; let weightsDetailTooltip = '';