我当前的代码:
const donutData = [
{
values: [2, 98],
labels: ['', ''],
sort: false,
marker: {
colors: ['#0099cc', '#535353'],
},
name: '',
hoverinfo: 'none',
textfont: {
size: [16, 1],
color: ['#ffffff', '#535353'],
fill: ['#ffffff', '#535353'],
},
hole: 0.7,
insidetextorientation: 'none',
type: 'pie',
textposition: 'none',
automargin: true,
},
];
const layout = {
paper_bgcolor: '#262626',
plot_bgcolor: '#262626',
autosize: true,
margin: { t: 100, b: 10, l: 0, r: 0 },
font: {
color: '#fff',
family: 'Roboto',
size: 18,
},
showlegend: false,
width: 500,
height: 500,
title: {
text: `donut`,
},
annotations: [
{
font: {
size: 60,
},
showarrow: false,
text: `30%`,
},
],
};
我想缩小标题和甜甜圈图表之间的空格.我try 在边距对象中添加Pad:0,但不起作用.此外,我在标题对象中也找不到任何相关属性.有没有物业可以帮我?增加了党卫军.