Reputation: 1878
How can I format the axis/tick labels labels ?
What if I need to change the font-style and font-size ?
I referred to the following question but was unsuccessful:
Tickformatter not performing as expected in latest version of Flot
Please Help !!!
Thnx.
Upvotes: 0
Views: 7411
Reputation: 8330
For my case I've fixed issue this way:
var _chart = $.plot($(element).find('[flot-placeholder]'), dataset, chartOptions);
$(element).find('.tickLabel').css('color', 'blue'); // fix
Upvotes: 0
Reputation: 1878
I used the following:
CSS File/SCSS File
#graph_label .tickLabel{
font-size: 50%;
}
Index.html or place where you are plotting the graph area
$.plot($("graph_label"), [dataArrayReference], options);
PS: I am using Flot Version prior to 0.8.1 so I dont have any idea about how latest version would work
Upvotes: 2
Reputation: 38199
If you're using 0.8, just override .flot-tick-label
in your stylesheet. You can get more specific via the flot-[x|y]-axis classes.
See the customizing the axes section of the docs for more info.
Upvotes: 5