how do you set a custom font size in flot pie chart?

504 views
Skip to first unread message

Mike Dylan

unread,
Feb 5, 2015, 12:12:26 PM2/5/15
to flot-...@googlegroups.com
I am trying to set the font size of the pie chart as this:

function setPieOptions() {
          options = {
                series: {
pie: {
show: true,
combine: {
color: '#999',
threshold: 0.1
}
}
},
legend: {
show: false
},
grid: {
hoverable: true,
clickable: true
}
xaxis: {
size: 14
}
yaxis: {
size: 14
}
}
}

I get syntax error. How do you set the font size of labels?

Thanks

Sean Poulter

unread,
Feb 6, 2015, 6:08:04 PM2/6/15
to flot-...@googlegroups.com
You have a few options:
  • The .pieLabel class is applied to the label elements when they're inserted
  • You can also use the labelFormatter to return your own HTML block, with the CSS that you prefer
You'll find a pretty good example in this JSFiddle here - http://jsfiddle.net/G4tAK/
Reply all
Reply to author
Forward
0 new messages