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",
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 = '';