Amcharts5 - 加载图表后更改子弹半径

问题描述 投票:0回答:1

我想在加载图表后更改子弹半径值。意思是让用户通过从下拉列表中选择值来选择半径

series.bullets.push(function(root) {
   return am5.Bullet.new(root, {
         sprite: am5.Circle.new(root, {
          radius: 2, // change this AFTER init with my own button
          fill: series.get("fill")
        })
    });
});
amcharts
1个回答
0
投票

这是完整的工作答案:

const series = this.chart.series.getIndex(0); // take the first series as an example
series.bulletsContainer.children.each((bullet) => {
   bullet.set('radius', 10);
});
© www.soinside.com 2019 - 2024. All rights reserved.