I'm trying to fit the text inside the circle, in paticulary I'm trying to add some labels such as Hour, Minutes,..
However I can't fit the text inside the circle; at this moment I'm using this inside the draw function:
$('body').append('<span style="font-size:'+this.i.css('font-size')+'" >'+this.i.val()+'</span>');
var ph_len=parseInt($('span:last').width());
$('span:last').remove();
if(ph_len>=parseInt(this.i.css('width'))){
var d=(((parseInt(this.i.css('width'))-parseInt(this.lineWidth))*parseInt(this.i.css('font-size'))/ph_len)).toFixed(1);
this.i.css({'font-size' : d + 'px '})
}
I'm also looking for a more elegant way to achieve this.
JSfiddle: http://jsfiddle.net/c963c/