@@ -738,6 +738,7 @@ function _hover(gd, evt, subplot, noHoverEvent) {
738738var EXTRA_STRING_REGEX = / < e x t r a > ( [ \s \S ] * ) < \/ e x t r a > / ;
739739
740740function createHoverText ( hoverData , opts , gd ) {
741+ var fullLayout = gd . _fullLayout ;
741742 var hovermode = opts . hovermode ;
742743 var rotateLabels = opts . rotateLabels ;
743744 var bgColor = opts . bgColor ;
@@ -925,6 +926,10 @@ function createHoverText(hoverData, opts, gd) {
925926 if ( d . nameOverride !== undefined ) d . name = d . nameOverride ;
926927
927928 if ( d . name ) {
929+ if ( fullLayout . meta ) {
930+ d . name = Lib . templateString ( d . name , { meta : fullLayout . meta } ) ;
931+ }
932+
928933 name = svgTextUtils . plainText ( d . name || '' , {
929934 len : d . nameLength ,
930935 allowedTags : [ 'br' , 'sub' , 'sup' , 'b' , 'i' , 'em' ]
@@ -970,7 +975,12 @@ function createHoverText(hoverData, opts, gd) {
970975 var hovertemplateLabels = d . hovertemplateLabels || d ;
971976 var eventData = d . eventData [ 0 ] || { } ;
972977 if ( hovertemplate ) {
973- text = Lib . hovertemplateString ( hovertemplate , hovertemplateLabels , eventData ) ;
978+ text = Lib . hovertemplateString (
979+ hovertemplate ,
980+ hovertemplateLabels ,
981+ eventData ,
982+ { meta : fullLayout . meta }
983+ ) ;
974984
975985 text = text . replace ( EXTRA_STRING_REGEX , function ( match , extra ) {
976986 name = extra ; // Assign name for secondary text label
0 commit comments