Search code examples
javascriptjquerygraphflot

Flot jQuery start xaxis tick on day 1


I need help about the xaxis ticks label. I have a set of data for 1 month and will need to display a graph with 3 days interval. I used this setting

tickSize: [3, "day"],

The problem is, the first tick label starts on the 3rd day of the month. I need it to start at day 1.

Below is jsfiddle from a previous question. (Thanks to Raidri!)


Solution

  • The solution was to set it like this:

    tickSize: [1.9, "day"]

    Now the ticksize interval is:

    Jun 1, 3, 5, 7, etc...

    Hope this helps someone!