1👍
I think the space might be due to your css. Try changing that. This solves your problem as well.
legend:{
position: 'bottom',
labels: {
boxWidth: 20,
padding: -10
}
}
- [Chartjs]-Linear gradient width using percentage (%) instead of pixels (px)
- [Chartjs]-Chart.js doughnut chart tooltip size?
0👍
One propose solution (perhaps there is a better way – still be interested…)
I found, in my case, I could do this just by adjusting the bottom of my container.
Using the following markup..
<div id='graphc'>
<canvas (click)='updateClick($event)' #mygraph></canvas>
</div>
and the following css
#graphc{
width:100%;
height: 100%;
padding: 10px;
padding-bottom: 120px; // <-- this moves it up
}
This at least does what I was after, though if I stretch, I do always have the gap….
Maybe I could make the css “dynamic” to fix this
- [Chartjs]-Chart.js :set yAxis point to 0 when there is gap between two dates
- [Chartjs]-How to display data values on Chart.js
Source:stackexchange.com