ソースを参照

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

Enrico Berti 10 年 前
コミット
07ccff4978
1 ファイル変更2 行追加2 行削除
  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