@@ -31,12 +31,12 @@ function hoverPoints(pointData, xval, yval, hovermode) {
3131
3232 newPointData . xLabelVal = undefined ;
3333 newPointData . yLabelVal = undefined ;
34- newPointData . extraText = makeHoverPointText ( cdi , trace , subplot ) ;
34+ makeHoverPointText ( cdi , trace , subplot , newPointData ) ;
3535
3636 return scatterPointData ;
3737}
3838
39- function makeHoverPointText ( cdi , trace , subplot ) {
39+ function makeHoverPointText ( cdi , trace , subplot , pointData ) {
4040 var radialAxis = subplot . radialAxis ;
4141 var angularAxis = subplot . angularAxis ;
4242 var hoverinfo = cdi . hi || trace . hoverinfo ;
@@ -50,7 +50,7 @@ function makeHoverPointText(cdi, trace, subplot) {
5050 text . push ( ax . _hovertitle + ': ' + Axes . tickText ( ax , val , 'hover' ) . text ) ;
5151 }
5252
53- if ( parts . indexOf ( 'all' ) !== - 1 ) parts = [ 'r' , 'theta' ] ;
53+ if ( parts . indexOf ( 'all' ) !== - 1 ) parts = [ 'r' , 'theta' , 'text' ] ;
5454 if ( parts . indexOf ( 'r' ) !== - 1 ) {
5555 textPart ( radialAxis , radialAxis . c2l ( cdi . r ) ) ;
5656 }
@@ -61,8 +61,12 @@ function makeHoverPointText(cdi, trace, subplot) {
6161 angularAxis . thetaunit === 'degrees' ? Lib . rad2deg ( theta ) : theta
6262 ) ;
6363 }
64+ if ( parts . indexOf ( 'text' ) !== - 1 && pointData . text ) {
65+ text . push ( pointData . text ) ;
66+ delete pointData . text ;
67+ }
6468
65- return text . join ( '<br>' ) ;
69+ pointData . extraText = text . join ( '<br>' ) ;
6670}
6771
6872module . exports = {
0 commit comments