AmCharts4 删除图形和容器之间的填充/边距
AmCharts4 Remove Padding / Margin between Graph and Container
有没有办法去除 AmCharts4 中容器和图形之间的填充?
我试过了chart.padding(0, 0, 0, 0)
但是没有效果
https://codepen.io/ChazUK/pen/JjKVvNv
const chart = am4core.create('chart', am4charts.GaugeChart);
chart.innerRadius = am4core.percent(80);
chart.logo.disabled = true;
chart.responsive.enabled = true;
... rest in codepen
您需要增加仪表的外半径,并将图表本身所有边缘的填充设置为 0:
chart.radius = am4core.percent(100);
chart.innerRadius = am4core.percent(80);
chart.paddingTop = 0;
chart.paddingRight = 0;
chart.paddingBottom = 0;
chart.paddingLeft = 0;
有没有办法去除 AmCharts4 中容器和图形之间的填充?
我试过了chart.padding(0, 0, 0, 0)
但是没有效果
https://codepen.io/ChazUK/pen/JjKVvNv
const chart = am4core.create('chart', am4charts.GaugeChart);
chart.innerRadius = am4core.percent(80);
chart.logo.disabled = true;
chart.responsive.enabled = true;
... rest in codepen
您需要增加仪表的外半径,并将图表本身所有边缘的填充设置为 0:
chart.radius = am4core.percent(100);
chart.innerRadius = am4core.percent(80);
chart.paddingTop = 0;
chart.paddingRight = 0;
chart.paddingBottom = 0;
chart.paddingLeft = 0;