@@ -68,23 +68,28 @@ function render(scene) {
6868
6969 if ( lastPicked !== null ) {
7070 var pdata = project ( scene . glplot . cameraParams , selection . dataCoordinate ) ,
71- hoverinfo = lastPicked . data . hoverinfo ;
71+ trace = lastPicked . data ,
72+ hoverinfo = trace . hoverinfo ;
73+
74+ var xVal = formatter ( 'xaxis' , selection . traceCoordinate [ 0 ] ) ,
75+ yVal = formatter ( 'yaxis' , selection . traceCoordinate [ 1 ] ) ,
76+ zVal = formatter ( 'zaxis' , selection . traceCoordinate [ 2 ] ) ;
7277
7378 if ( hoverinfo !== 'all' ) {
7479 var hoverinfoParts = hoverinfo . split ( '+' ) ;
75- if ( hoverinfoParts . indexOf ( 'x' ) === - 1 ) selection . traceCoordinate [ 0 ] = undefined ;
76- if ( hoverinfoParts . indexOf ( 'y' ) === - 1 ) selection . traceCoordinate [ 1 ] = undefined ;
77- if ( hoverinfoParts . indexOf ( 'z' ) === - 1 ) selection . traceCoordinate [ 2 ] = undefined ;
80+ if ( hoverinfoParts . indexOf ( 'x' ) === - 1 ) xVal = undefined ;
81+ if ( hoverinfoParts . indexOf ( 'y' ) === - 1 ) yVal = undefined ;
82+ if ( hoverinfoParts . indexOf ( 'z' ) === - 1 ) zVal = undefined ;
7883 if ( hoverinfoParts . indexOf ( 'text' ) === - 1 ) selection . textLabel = undefined ;
7984 if ( hoverinfoParts . indexOf ( 'name' ) === - 1 ) lastPicked . name = undefined ;
8085 }
8186
8287 Fx . loneHover ( {
83- x : ( 0.5 + 0.5 * pdata [ 0 ] / pdata [ 3 ] ) * width ,
84- y : ( 0.5 - 0.5 * pdata [ 1 ] / pdata [ 3 ] ) * height ,
85- xLabel : formatter ( 'xaxis' , selection . traceCoordinate [ 0 ] ) ,
86- yLabel : formatter ( 'yaxis' , selection . traceCoordinate [ 1 ] ) ,
87- zLabel : formatter ( 'zaxis' , selection . traceCoordinate [ 2 ] ) ,
88+ x : ( 0.5 + 0.5 * pdata [ 0 ] / pdata [ 3 ] ) * width ,
89+ y : ( 0.5 - 0.5 * pdata [ 1 ] / pdata [ 3 ] ) * height ,
90+ xLabel : xVal ,
91+ yLabel : yVal ,
92+ zLabel : zVal ,
8893 text : selection . textLabel ,
8994 name : lastPicked . name ,
9095 color : lastPicked . color
0 commit comments