I have tried this solution as well as other solutions. But nothing is working as I want. On a ChartJS pie-charts canvas, when I am using a height attribute, it's working fine. Like:
<canvas id="a_Pie_Chart" height="400"></canvas>
But when I am removing the height attribute and trying to define it using CSS it doesn't seem to work. Like:
HTML:
<canvas id="a_Pie_Chart" class="chartCanvas"></canvas>
CSS:
.chartCanvas {
height : 400px;
}
It is to add that in Javascript of the chartjs I am using:
options: {
responsive: true,
responsiveAnimationDuration: 500,
mainAspectRatio : false
}
and My Pie chart has too much (minimum 20) labels and data. How do I solve this problem?