Sunday, June 2, 2024
 Popular · Latest · Hot · Upcoming
55
rated 0 times [  61] [ 6]  / answers: 1 / hits: 45238  / 8 Years ago, thu, july 28, 2016, 12:00:00

In Chart.js, is there any way to write the labels inside of the horizontal bars in a horizontalBar chart? As in something like:



this



Is anything similar to this possible in Chart.js?



Thanks!


More From » chart.js

 Answers
27

There is now on option mirror to make the label appear inside the bar.



Example of options config for a horizontalBar chart :



options: {
scales: {
yAxes: [{ticks: {mirror: true}}]
}
}


Doc : http://www.chartjs.org/docs/latest/axes/cartesian/#common-configuration


[#61216] Tuesday, July 26, 2016, 8 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
kamronr

Total Points: 749
Total Questions: 110
Total Answers: 122

Location: Dominica
Member since Sat, Nov 5, 2022
2 Years ago
kamronr questions
Mon, Dec 21, 20, 00:00, 4 Years ago
Fri, Oct 16, 20, 00:00, 4 Years ago
Sat, Oct 3, 20, 00:00, 4 Years ago
Sun, Jul 28, 19, 00:00, 5 Years ago
;