You want to use this:
labelFormatter: function(label, series) {
// series is the series object for the label
return '<span style="font-style:bold">' + label + '</span>';
}
Question
I created a Donut Pie chart using Flot.
Is there a way to customize "Legend"? I want to GFavorite, G2 and G3 to font to be bold. I added:
pie: {
innerRadius: 0.5,
show: true,
formatter: function(label, series){
return '<div style="font-style:bold">';
}
}
But it does not do anything.
Solution
You want to use this:
labelFormatter: function(label, series) {
// series is the series object for the label
return '<span style="font-style:bold">' + label + '</span>';
}
OTHER TIPS
The CSS is incorrect...
font-weight
is the proper tag for using bold, not font-style.