Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Axis label in Flot

Does anyone know how one can set the label or title of an axis in Flot?

I've read the API but it doesn't seem to have that feature...

Thanks :)

like image 412
Nobita Avatar asked Apr 06 '11 08:04

Nobita


2 Answers

There are none built-in to flot.

Your best bet is to do it yourself via positioned divs, but if you are adventurous, you can look at the issue (Or the original issue) and see how other people have dealt with it.

Specifically, there are two people who have recently made label-related revisions to flot:

https://github.com/RuiPereira/flot/raw/axislabels/jquery.flot.axislabels.js

http://github.com/xuanluo/flot-axislabels

like image 168
Ryley Avatar answered Sep 23 '22 01:09

Ryley


Shameless self-plug: I fixed and greatly extended xuanluo's flot-axislabels plugin: http://github.com/markrcote/flot-axislabels/ As far as I know, it is the best solution for axis labels at the moment.

like image 35
Mark Avatar answered Sep 20 '22 01:09

Mark