Skip to content

Data Labels added for Bar graph#688

Open
sujeetpillai wants to merge 1 commit into
morrisjs:masterfrom
sujeetpillai:add_data_labels
Open

Data Labels added for Bar graph#688
sujeetpillai wants to merge 1 commit into
morrisjs:masterfrom
sujeetpillai:add_data_labels

Conversation

@sujeetpillai

Copy link
Copy Markdown

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
Copy Markdown

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