diff --git a/superset/assets/src/visualizations/heatmap.js b/superset/assets/src/visualizations/heatmap.js index 7d471d5d80..c26291ffca 100644 --- a/superset/assets/src/visualizations/heatmap.js +++ b/superset/assets/src/visualizations/heatmap.js @@ -177,11 +177,12 @@ function heatmapVis(slice, payload) { const k = d3.mouse(this); const m = Math.floor(scale[0].invert(k[0])); const n = Math.floor(scale[1].invert(k[1])); + const metric = typeof fd.metric === 'object' ? fd.metric.label : fd.metric; if (m in matrix && n in matrix[m]) { const obj = matrix[m][n]; s += '
' + fd.all_columns_x + ': ' + obj.x + '
'; s += '
' + fd.all_columns_y + ': ' + obj.y + '
'; - s += '
' + fd.metric + ': ' + valueFormatter(obj.v) + '
'; + s += '
' + metric + ': ' + valueFormatter(obj.v) + '
'; if (fd.show_perc) { s += '
%: ' + fp(fd.normalized ? obj.rank : obj.perc) + '
'; }