I have been trying to search for a solution to get the legend colorboxes as line using chartjs, but it looks like we can only reduce them to vertical boxes using boxWidth parameter but not horizontal due to the absence of boxLength parameter. I cannot tweak the chartjs library as the production environment downloads it on the go.
I have used the pointStyle as line to get it for the linechart alone, but I cannot find a way to get the same for barcharts and pie charts
here is the code I have used for linechart
legend: {
onClick: this.onLegendCallBack,
display: true,
position : 'bottom',
labels: {
fontFamily: 'sans-serif',
fontSize: 12,
boxWidth : 1,
usePointStyle: true
}
}