Chartjs-How to change aspectRatio option with RWD in chartjs?

0👍

You could set the aspectRatio option in your configuration as a scriptable option where you can return the value coming from your logic, accessing to screen size or CSS and checking the value of min-width:

options: {
  aspectRatio(ctx) {
    // your logic
    return yourValue;
  },
  .... 
}

Leave a comment