-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrong label position on Bar Charts #21
Comments
if you want to have it on top (like i wanted) change in line 31 "data.y1" to "data.y2" and the same in line 37 and 43. it takes the wrong y-data if you want to have it displayed on top. |
Experiencing the same issue. @gaenseklein Can you provide more context? I don't see anything that has a line 31, 37, or 43. |
@matthewgillespie sure. sorry for not giving enough information. in the function "labelPositionCalculation" there it defines several positions for bar-charts.
and i would change the calling of the plugin to:
|
oh, in case you are wondering: i am not the only person who came up with this solution, as there is already a pull request open with the exact same patch, so i did not open a second one: |
@gaenseklein thank you for the thorough answer! |
Thanks for the solution @gaenseklein. It didn't work for me though. Whenever I put align: 'top' inside Chartist.plugins.ctPointLabels it breaks the chart. Any ideas? |
I tried you solution, but somehow it breaks the graph. Only one leftmost bar seems to appear and all the others are thrown away even in the DOM. Any alternative to it? |
I could not make this work properly on barcharts.
This is my code:
This is my result:
I tried with this changes in the code, to no avail.
Any pointers or help is appreciated
The text was updated successfully, but these errors were encountered: