if (i % labelSpan == 0) {
String label = String.valueOf(min + (j * labelSpan));
offset = 0;
// Place leftmost label to right
if (i != min)
offset = fm.stringWidth(label) / 2;
if (i >= max) // Place rightmost label to left
offset = fm.stringWidth(label);
mygfx.drawString(label, x - offset, size.height/2);
mygfx.drawLine(x, size.height/2, x, size.height);