chartjs-plugin-labels icon indicating copy to clipboard operation
chartjs-plugin-labels copied to clipboard

Doesnt work for Stacked bar chart

Open vbbalaji opened this issue 5 years ago • 1 comments

Here is the code: var mStackBar = new Chart(document.getElementById("ACTasks").getContext('2d'), { type: 'bar', data: { labels: ["2014","2015"], datasets: [{ data: [23,11], backgroundColor: "#db5935" },{ data: [15,25], backgroundColor: "#f0ae43" },{ data: [32,34], backgroundColor: "#8CC152" }] }, options: { scales: { xAxes: [{ display:true, stacked: true }], yAxes: [{ barPercentage:0.5, display:true, beginAtZero: true, ticks:{max:80}, stacked: true }] }, maintainAspectRatio: false, legend:{display:false}, plugins: { labels:[ {display:true, position: 'outside', render: 'value', fontColor:'#000', fontSize: 10}, {display:true, position: 'inside', render: 'percentage', fontColor:'#000', fontSize: 10} ] } } });

vbbalaji avatar Jun 25 '20 20:06 vbbalaji

The percentage does not work with my bar chart either. It shows up beautifully for the pie chart though.

peterpoliwoda avatar Jul 02 '20 17:07 peterpoliwoda