Skip to content
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

Data Labels added for Bar graph #688

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sujeetpillai
Copy link

I've added options to display Data Labels ( y values inside the bar like in excel) into the Bar chart. Default is set to not display. It adheres to the yLabelFormat and has options to set font, size, color, position, etc.

dataLabels:true/false,
dataLabelsPosition:'inside'/'outside',
dataLabelsFamily: 'sans-serif' // Font Family,
dataLabelsSize:14 // Font Size
dataLabelsWeight: 'bold' // Font Weight
dataLabelsColor: '#fff' // Font Color

Have also added a new example for the same.

Note: The change on line 1507 (new) from morris.js in the diff below isn't something I changed. I'm guessing the morris.bar.coffee file in the master was a bit newer than the morris.js built file.

@pierresh
Copy link

Thanks a lot for your commit, that works perfectly!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants