Advertisement
gundambison

a gag assr

Nov 15th, 2018
172
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     function numberWithCommas2(x0) {
  2.         //x = Math.round(x0);
  3.         //console.log(x);
  4.         x = x0.toString();
  5.         var pattern = /(-?\d+)(\d{3})/;
  6.  
  7.         while (pattern.test(x))
  8.             x = x.replace(pattern, "$1.$2");
  9.         return x;
  10.     }
  11. //------------
  12.  tooltip: {
  13.             formatter: function () {
  14.                 num_y = numberWithCommas2(this.y);
  15.                 num_total = numberWithCommas2(this.point.stackTotal);
  16.  
  17.  
  18.                 return '<b>' + this.x + '</b><br/>' +
  19.                         this.series.name + ': ' + num_y + '<br/>' +
  20.                         'Total: ' + num_total;
  21.             }
  22.         },
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement