Flot Data Labels

Here is how I added the feature, including a pleasant animation effect: var p = $.plot(…); $.each(p.getData()[0].data, function(i, el){ var o = p.pointOffset({x: el[0], y: el[1]}); $(‘<div class=”data-point-label”>’ + el[1] + ‘</div>’).css( { position: ‘absolute’, left: o.left + 4, top: o.top – 43, display: ‘none’ }).appendTo(p.getPlaceholder()).fadeIn(‘slow’); }); You can move the position and display css … Read more

Flot With “String” x-axis

@Matt is close, but it would make more sense to just use the ticks option to directly specify what ticks should have what labels: var options = { … xaxis: { ticks: [[0,’Bob’],[1,’Chris’],[2,’Joe’]] } … }; EDIT: it looks like this (I added more data than labels, but you get the idea).

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)