In my amcharts i like to add a text inside the Rectangle
bullet. how to add? this is what I need:
here is my bullet part of code: ( using amchart5)
series2.bullets.push(function () {
return am5.Bullet.new(root, {
sprite: am5.Rectangle.new(root, {
height: 10,
width: 10,
centerX: 5,
centerY: 10,
stroke: am5.color('#f00'),
}),
});
});
I added using label:
` series2.bullets.push(function () {
return am5.Bullet.new(root, {
sprite: am5.Label.new(root, {
text: 'H',
fontSize: 8,
centerX: am5.percent(50),
centerY: am5.percent(70),
textAlign: 'center',
populateText: true,
}),
});
`
works fine.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.