Open
Description
Given this as the TinRingConfig
const config: TinyRingConfig = {
percent: 0,
width: 50,
height: 50,
color: ['rgb(255,255,255)', value.percent < 0.8 ? '#1668dc' : '#dc4446'],
innerRadius: 0.85,
radius: 0.98,
loading: false,
annotations: [
{
type: 'text',
style: {
text: `${value.percent?.toFixed(0)}%`,
x: '50%',
y: '45%',
textAlign: 'center',
fontSize: 12,
fill: `${value.percent < 0.8 ? 'rgba(232,237,243,0.9)' : '#dc4446'}`,
fontStyle: 'bold',
},
},
{
type: 'text',
style: {
text: `${type === DeviceStatType.CPU ? 'cpu' : 'mem'}`,
x: '48%',
y: '68%',
textAlign: 'center',
fontSize: 8,
fill: 'rgba(232,237,243,0.9)',
fillOpacity: 0.95,
fontStyle: 'normal',
},
},
],
};
Will display the inside annotations, but change the percentage to something > 0, and the annotations seems to be hidden behind.
Latest version fo ant charts
Metadata
Metadata
Assignees
Labels
No labels