Explorar o código

[spark] Unified tooltip for discrete bar chart and numeric bar chart

Enrico Berti %!s(int64=10) %!d(string=hai) anos
pai
achega
07ccff4
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      desktop/core/static/js/nv.d3.growingDiscreteBarChart.js

+ 2 - 2
desktop/core/static/js/nv.d3.growingDiscreteBarChart.js

@@ -35,8 +35,8 @@ nv.models.growingDiscreteBarChart = function() {
     , staggerLabels = false
     , tooltips = true
     , tooltip = function(key, x, y, e, graph) {
-        return '<h3>' + x + '</h3>' +
-               '<p>' +  y + '</p>'
+        return '<h3>' + key + '</h3>' +
+               '<p>' +  y + ' on ' + x + '</p>'
       }
     , x
     , y