Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change Position of legend in vue-chartJS

I'm new to Vue-ChartJs, and got really curious about this:

Legend position

How do I change the legend position to the bottom of the graph?

like image 535
Rheza001 Avatar asked Dec 19 '25 16:12

Rheza001


2 Answers

chartOptions: {
// other options...
      plugins: {
        legend: {
          position: 'right'
          }
      }
    }
like image 69
sGp Avatar answered Dec 21 '25 05:12

sGp


In your chart options object use this:

const chartOptions = {
  // other options...
  legend: {
    position: 'bottom'
  }
}
like image 40
Ribas Developer Avatar answered Dec 21 '25 06:12

Ribas Developer



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!