Open GoogleCodeExporter opened 8 years ago
Would be nice if commas could be added back in after parsing, to display more
readable numbers.
Original comment by webk...@live.ca
on 10 Feb 2012 at 6:57
function addCommas(str) {
return str.toString().replace(/\B(?=(?:\d{3})+(?!\d))/g, ",");
}
$.each(yLabels, function(i){
var thisLi = $('<li><span>'+addCommas(this)+'</span></li>')
.prepend('<span class="line" />')
.css('bottom',liBottom*i)
.prependTo(ylabelsUL);
var label = thisLi.find('span:not(.line)');
var topOffset = label.height()/-2;
if(i == 0){ topOffset = -label.height(); }
else if(i== yLabels.length-1){ topOffset = 0; }
label
.css('margin-top', topOffset)
.addClass('label');
});
Original comment by webk...@live.ca
on 10 Feb 2012 at 7:07
Original issue reported on code.google.com by
Seiichi....@gmail.com
on 5 Sep 2011 at 2:37