File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -173,9 +173,11 @@ function createChart(chartDataTree: Tree): Highcharts.Chart {
173173 align : 'right' ,
174174 padding : 30 ,
175175 nodeFormatter : function ( ) {
176- const point = this as any ;
177- const percentage = 'linksTo' in point && point . linksTo [ 0 ] ? ( point . sum / point . linksTo [ 0 ] . fromNode . sum ) * 100 : null ;
178- return this . point . name + ": " + numberFormat ( ( 'getSum' in this . point ? ( this . point as any ) . getSum ( ) : 0 ) ) + " " + ( percentage ? "<span class='badge text-bg-secondary'>" + Math . round ( percentage ) + "% </span>" : "" ) ;
176+ const point = this as Highcharts . Point ;
177+ const sum = 'getSum' in this ? ( this as any ) . getSum ( ) : 0 ;
178+ const percentage = 'linksTo' in point && point . linksTo [ 0 ] ? ( sum / point . linksTo [ 0 ] . fromNode . sum ) * 100 : null ;
179+
180+ return point . name + ": " + numberFormat ( sum ) + " " + ( percentage ? "<span class='badge text-bg-secondary'>" + Math . round ( percentage ) + "% </span>" : "" ) ;
179181 }
180182 } ,
181183 tooltip : {
@@ -186,7 +188,7 @@ function createChart(chartDataTree: Tree): Highcharts.Chart {
186188 } ,
187189 // tooltip for node
188190 nodeFormatter : function ( ) {
189- const point = this as any ;
191+ const point = this as Highcharts . Point ;
190192
191193 let totalWeight = 0 ;
192194 let weightsDetailTooltip = '' ;
You can’t perform that action at this time.
0 commit comments