I've drawn a circular gauge using extjs chart series. I would like to indicate the value of the gauge into the middle of it but I don't succeed. Does anyone could help me?
Here is the code I tried:
{
xtype: 'polar',
width: 60,
height: 60,
background: '#00c6c9',
style: {left:0, right:0},
series: {
type: 'gauge',
minimum: 0,
maximum: 30,
value: 10,
colors: ['#25a2b6', 'lightgrey'],
donut: 75,
background: '#00c6c9',
totalAngle: Math.PI * 2,
style: {left:0, right:0},
needleLength: 100
/*,
renderer: function(sprite, record, attributes, index, store) {
var sprite2 = Ext.create('Ext.draw.Sprite', {
type: 'text',
text: Math.floor(attributes.value),
font: '16px Arial',
x: 30,
y: 30
});
sprite2.show(true);
return attributes;
},
label: {
field: 'value',
display: 'middle'
}*/
}
}
I just want to show the value '10' of the series. In comments you can see I tried to add a renderer function and a label property. In this label, I guess I cannot write "field:'value'" but since I don't need to define a field I don't konw what to use.
Many thanks