我正在Pie Chart中研究ng2-charts。我正在尝试自定义图例的默认形状。我可以更改图例的位置,但是可以更改形状吗?它具有任何内置属性还是我们必须自定义?
HTML
<div class="chart">
<canvas baseChart
[data]="pieChartData"
[labels]="pieChartLabels"
[chartType]="pieChartType"
[options]="pieChartOptions"
[plugins]="pieChartPlugins"
[colors]="pieChartColors"
[legend]="pieChartLegend">
</canvas>
</div>
TS
public pieChartLabels: Label[] = [['Download', 'Sales'], ['In', 'Store', 'Sales'], 'Mail Sales'];
public pieChartData: number[] = [300, 500, 100];
public pieChartType: ChartType = 'pie';
public pieChartOption: any = {
legend: {
position: 'right',
labels: {
fontSize: 10
}
}
}
我得到的东西