I am using ng2 chart with angular 7. I have a piechart
How to increase space between the legend and the chart?
I am trying to this, but it doesn't work.
public pieChartOptions: ChartOptions = {
responsive: true,
rotation: 0,
plugins: {
afterFit: function(chart, options) {
chart.plugins.register({
afterFit: function() {
this.height = this.height + 150;
},
})
},
datalabels: {
align: 'end',
anchor: 'end',
formatter: (value, ctx) => {
const label = ctx.chart.data.labels[ctx.dataIndex];
return value + '% ';
},
font: {
weight: 'bold',
size: 16,
}
}
}
};