emn178 / chartjs-plugin-labels

Plugin for Chart.js to display percentage, value or label in Pie or Doughnut.
MIT License
612 stars 219 forks source link

horizontalBar not working #122

Open baroninn opened 4 years ago

baroninn commented 4 years ago

i beleve you have support for horizontalBar. But I dont see anything when using horizontalBar.

any special variables or hooks I need to add to the code ?

vbbalaji commented 4 years ago

Me too. Same code works perfectly fine with regular bar chart.

jcroucher commented 3 years ago

Check this fork. It has support for both Horizontal and Vertical bar charts.

https://github.com/jcroucher/chartjs-plugin-labels/blob/master/src/chartjs-plugin-labels.js

leandropapasidero commented 3 years ago

@jcroucher you code didn't work for me. All of the values disappear for bar, horizontal bar and doughnut.

jcroucher commented 3 years ago

Are there any errors? I copied the code out of a working project. It should look like this

Screen Shot 2020-08-04 at 9 06 39 am Screen Shot 2020-08-04 at 9 07 44 am Screen Shot 2020-08-04 at 9 09 46 am

leandropapasidero commented 3 years ago

No errors. Can you create a codepen?

jcroucher commented 3 years ago

https://codepen.io/jcroucher/pen/WNwegMe

Note that for some reason including chartjs-plugin-labels as an external JS within CodePen doesn't work. Inline it works, my actual live project uses it as an import within Vue.