shiro
shiro

Reputation: 255

jquery flot axis labeling

Please refer to http://jsfiddle.net/UEePE/1025/

for the x-axis, when I don't want to skip any month on the label, how can I do it?

Thanks

Upvotes: 1

Views: 2267

Answers (1)

Zoltan Toth
Zoltan Toth

Reputation: 47667

specify the ticks parameter - http://jsfiddle.net/UEePE/1029/

var data = [[-373597200000, 315.71], [-370918800000, 317.45], [-368326800000, 317.50],  [-99968400000, 319.79]];

$.plot($("#placeholder"), data, {
        yaxis: {
        },
        xaxis: { mode: "time",
                 ticks: 18,
                 minTickSize: [1, "month"],
                 tickLength: 1,
                 min: (new Date("2000/01/01")).getTime(),
                 max: (new Date("2001/07/02")).getTime()
},
        "lines": {"show": "true"},
        "points": {"show": "true"},
        clickable:true,hoverable: true
});

Upvotes: 3

Related Questions