I am using Chart.js for generating BarChart. How can I align labels, so that rotation is 90 and all labels are aligned to start of each label. Currently, all labels are aligned to end of each label.
I am trying to display all labels to start at same vertical position - where 'A' of Avengers is. Currently all labels are ending at same vertical position - where 'r' of War is.
I need text turned towards right (not left) and coming from bottom to top (not top to bottom)
public barChartOptions: ChartOptions = {
responsive: true,
legend: {
display: false
},
scales: {
xAxes: [{
ticks: {
// maxRotation: 90,
minRotation: 90,
labelOffset: 0,
padding:-140
},
}]
},
};
Stackblitz link: https://ng2-charts-bar-template-tdpncj.stackblitz.io
Stackblitz code link: https://stackblitz.com/edit/ng2-charts-bar-template-tdpncj