I drew a circular gauge using a series of extjs diagrams. I would like to indicate the sensor value in the middle, but I do not succeed. Can anybody 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 meaning of the "10" series. In the comments, you can see that I tried to add a rendering function and a label property. On this label, I think I can not write "field: 'value", but since I do not need to define a field, I do not know what to use.
Many thanks