@@ -31,12 +31,12 @@ function hoverPoints(pointData, xval, yval, hovermode) {
31
31
32
32
newPointData . xLabelVal = undefined ;
33
33
newPointData . yLabelVal = undefined ;
34
- newPointData . extraText = makeHoverPointText ( cdi , trace , subplot ) ;
34
+ makeHoverPointText ( cdi , trace , subplot , newPointData ) ;
35
35
36
36
return scatterPointData ;
37
37
}
38
38
39
- function makeHoverPointText ( cdi , trace , subplot ) {
39
+ function makeHoverPointText ( cdi , trace , subplot , pointData ) {
40
40
var radialAxis = subplot . radialAxis ;
41
41
var angularAxis = subplot . angularAxis ;
42
42
var hoverinfo = cdi . hi || trace . hoverinfo ;
@@ -50,7 +50,7 @@ function makeHoverPointText(cdi, trace, subplot) {
50
50
text . push ( ax . _hovertitle + ': ' + Axes . tickText ( ax , val , 'hover' ) . text ) ;
51
51
}
52
52
53
- if ( parts . indexOf ( 'all' ) !== - 1 ) parts = [ 'r' , 'theta' ] ;
53
+ if ( parts . indexOf ( 'all' ) !== - 1 ) parts = [ 'r' , 'theta' , 'text' ] ;
54
54
if ( parts . indexOf ( 'r' ) !== - 1 ) {
55
55
textPart ( radialAxis , radialAxis . c2l ( cdi . r ) ) ;
56
56
}
@@ -61,8 +61,12 @@ function makeHoverPointText(cdi, trace, subplot) {
61
61
angularAxis . thetaunit === 'degrees' ? Lib . rad2deg ( theta ) : theta
62
62
) ;
63
63
}
64
+ if ( parts . indexOf ( 'text' ) !== - 1 && pointData . text ) {
65
+ text . push ( pointData . text ) ;
66
+ delete pointData . text ;
67
+ }
64
68
65
- return text . join ( '<br>' ) ;
69
+ pointData . extraText = text . join ( '<br>' ) ;
66
70
}
67
71
68
72
module . exports = {
0 commit comments