Fleet not showing X axis label

I draw the data as follows, but I cannot get the labels of the axis labels:

!function ($) { var options = { xaxis: { mode: "time", min: start_time, // max: (new Date()).getTime(), tickSize: [4, "hour"], tickLength: 0, axisLabel: 'Day', axisLabelUseCanvas: true, axisLabelFontSizePixels: 12, axisLabelFontFamily: 'Verdana, Arial, Helvetica, Tahoma, sans-serif', axisLabelPadding: 3 }, yaxis: { axisLabel: 'Amount', axisLabelUseCanvas: true, axisLabelFontSizePixels: 12, axisLabelFontFamily: 'Verdana, Arial, Helvetica, Tahoma, sans-serif', axisLabelPadding: 5 }, } $.plot($("#placeholder"), [open_emails],options); }(window.jQuery 

In my views, I included the following: they load

 //= require jquery.flot //= require jquery.flot.symbol.min //= require jquery.flot.axislabels 

The result is as follows:

enter image description here

How can I get shortcuts for display?

+4
source share
1 answer

Hiya working demo http://jsfiddle.net/wuALT/

So you need to add this:

 <script type='text/javascript' src="https://raw.github.com/xuanluo/flot-axislabels/master/jquery.flot.axislabels.js"></script> 

and the break code will begin to identify axisLabel.

Reading: http://codenachos.com/view/axis-labels-in-flot had a known issue http://code.google.com/p/flot/issues/detail?id=42

This will help and will now see Day and Amount on the X and Y axis.

enter image description here

+6
source

Source: https://habr.com/ru/post/1411735/


All Articles