Chartjs-How to fix this design issue in chart js react application

0👍

Chart.js doesn’t provide any direct property to customize the margin you are talking about. The only thing you can change is the padding, however, only the top padding is impacted concerning the legend.

According to their doc, a good way to setup this margin is to use the custom HTML Legend : HTML Legend

This method allow you to give any style input in html elements containing the legend.

Leave a comment