Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Flot:how to align xaxis labels center over the tick line, and put labels in the plot area instead of outside space

I am wondering whether there's configuration to put axis ticks "center" over the tick line? and also put them in the plot area instead of outside space?

for the latter issue, i used "labelMargin:-30" in the grid options, while it made a difference than not setting this, however, no further difference if i set "labelMargin:-50" or using another bigger negative number. anybody knows how to deal with this?

thanks in advance!

like image 323
Simon Avatar asked May 09 '11 01:05

Simon


1 Answers

I narrowed the bars on a histogram and centered the label under the bar, by formatting the bars as so:

series: {

      bars: {'show': 'true', 'align': "center", 'barWidth':0.7}

       }
like image 118
David__ Avatar answered Oct 08 '22 16:10

David__