zhaoweikai / flot

Automatically exported from code.google.com/p/flot
MIT License
0 stars 0 forks source link

Doesnt show first month #716

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
(first of all sorry for my pour english)
Idk if im wrong or flot has a problem... I cant show the label of the first 
month of my data in the x-axis. My options are:

var options = {
       xaxis: { mode: "time",monthNames: ["Ene", "Feb", "Mar", "Abr", "May", "Jun", "Jul", "Ago", "Sep", "Oct", "Nov", "Dic"],
       timeformat: "%b-%y",
       minTickSize: [1, "month"]
},
       lines: { show: true },
       points: { show: true },
           grid: { hoverable: true },
       legend: { show: true, container: "#divleyenda" }
    };

I have a ss right here..

Original issue reported on code.google.com by busk...@gmail.com on 9 Jul 2012 at 2:21

Attachments:

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
We attempted to solve this with the following patch:

https://github.com/flot/flot/pull/56

- Previously UTC hours was set to 0 without taking timezone into account. This 
patch takes timezone offset into account to reset hours to 0.

- In some cases, the resetting of the first tick value forced it to be less 
than the minimum data value which resulted in the first tick label not being 
displayed. This patch always displays the first tick label whether the first 
tick value is less than or greater than axis.min.

If there's a better way to go about it, do let us know.

Original comment by vu2...@gmail.com on 9 Jul 2012 at 10:28

GoogleCodeExporter commented 9 years ago
Thank u! i did the change but nothing happends =( i have a solution but maybe a 
stupid solution... this is by setting de min of the xaxis to a "false date" the 
false date is de first date of my data - 1 month... if im in the first month of 
the year -> month = 12; year -- ... 

 min: (new Date("'.$false_date.'")).getTime()

I'll appriciate if u tell me how to do the change b/c it doesnt work at all =/ 
Thank u so much! 

PD. Where is the file jquery.flot.time.js ? 

Original comment by busk...@gmail.com on 10 Jul 2012 at 1:28

GoogleCodeExporter commented 9 years ago
Thank u so much! now it works! it was my problem i didnt change the correct 
file in the correct folder.. the server has two versions 0.6 and 0.7 im using 
0.6 and id edit 0.7 files xD! lol! Thank u!

Original comment by busk...@gmail.com on 10 Jul 2012 at 1:52

GoogleCodeExporter commented 9 years ago

Original comment by dnsch...@gmail.com on 31 Jul 2012 at 1:36

GoogleCodeExporter commented 9 years ago
Hi again... your solution solved my problem for a while, but now i have another 
problem... my ticks are align to left.. do u know what is the problem so i can 
think about a solution? Thank u!

Original comment by busk...@gmail.com on 14 Aug 2012 at 1:06

GoogleCodeExporter commented 9 years ago

Original comment by dnsch...@gmail.com on 16 Aug 2012 at 2:50