javascript - Chart.js legend position error -


i try move legend of pie chart(created chart.js 2.0) left or right, error. bottom , top option works.

var mychart = new chart(ctx, {         type: 'pie',         data: {             labels: optionlabels,             datasets: [{                 label: '# of resources',                 data: optiondata,                 backgroundcolor: optioncolor,                 bordercolor: "white",                 borderwidth: 1,              }]         },         options: {             legend: {                 position: 'left'             }         }     }); 

enter image description here

is there library bug or similar?

seems using old version of chartjs (which might have bug).

make sure use latest version of chartjs, 2.7.0 at-the-moment.

see working example.


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -