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' } } });
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
Post a Comment