๐:1
I assume you are using chart.js v2.
You can use barThickness
to adjust the size of the bar:
https://www.chartjs.org/docs/2.9.4/charts/bar.html#barthickness
stackedChartData: ChartDataSets[] = [
{
label: 'Dataset 1',
backgroundColor: '#adcde1',
data: [10, 20, 30, 40, 50, 60, 70, 80, 90, 100],
barThickness: 10 // adjust bar size
},
{
label: 'Dataset 2',
backgroundColor: '#3a77af',
data: [10, 20, 30, 40, 50, 60, 70, 80, 90, 100].reverse(),
barThickness: 10 // adjust bar size
}
];
Demo codesandbox:
https://stackblitz.com/edit/ng2-charts-bar-template-2eizu5?file=src%2Fapp%2Fapp.component.ts