Chartjs-How to decrease white space of a card containing pie-chart in mobile view

0๐Ÿ‘

โœ…

@media (max-width:400px) {
  .padding {
      padding: 1rem ;  
  }
  .card {  
    height: 19rem;  /* this code makes it possible */  
    top: -50px;
  }
}

Adding height helped because after inspecting elements, the CSS affecting the the card was displayed and then with trial and error the desirable height was successfully implemented.

Leave a comment