如何将padding应用于component.ts中的图例。我试图在component.css中应用填充,但填充不应用于图例。请帮我解决此错误。 我正在使用插件
<script
src="../node_modules/chart.js/dist/Chart.bundle.min.js"></script>
public options:any = {
Label: {
display: true,
},
// legend: {position: 'bottom'},
legend: {
enabled: true,
},
tooltips: {
enabled: true,
},
};
<div id="mychart" style="display: block;max-width:400px;margin:75px auto">
<canvas baseChart
[data]="doughnutChartData"
[labels]="doughnutChartLabels"
[chartType]="doughnutChartType"
[colors]="colors"
[options]="options"
(chartHover)="chartHovered($event)"
(chartClick)="chartClicked($event)"></canvas>
</div>