Chartjs-How can I change the position of legends in chart.js?

0👍

I believe it needs to be set under the plugins property in options, like

options: {
      plugins: { /// PUT LEGEND UNDER THIS PROP
          legend: {
              position: 'bottom',
          }
      },
      scales: {
        y: {
            beginAtZero: true,
            display: false }// end: y 
      ,x: {
            grid: {
               borderDash: [6, 5],
               lineWidth: 1,
               color:'#CCCCCC' }// end grid
        }//end:x
    } // end: scales
} //end options

Leave a comment