Ответ 1
Вы можете сделать это, используя свойство tickFormatter оси.
xaxis: {
tickFormatter: function(val, axis) {
// insert comma logic here and return the string
}
}
Источник: http://people.iola.dk/olau/flot/API.txt (в разделе "Настройка осей" )
Эта страница имеет функцию для форматирования чисел с запятыми: http://www.mredkj.com/javascript/nfbasic.html
Пример для yaxis:
$(function () {
var plotarea = $("#plotarea");
$.plot( plotarea , [data], {
xaxis: {mode: "time", timeformat: "%m/%d %H:%M:%S"},
yaxis: {tickFormatter: function numberWithCommas(x) {
return x.toString().replace(/\B(?=(?:\d{3})+(?!\d))/g, ",");
}
},
points: { show: true },
lines: { show: true, fill: true }
} );
});