I have a simple flot line chart with daily data samples. But the range is user selectable (anything from 2 days up to several years of data).
var chartConfig = {
xaxis: {
mode: "time",
timeformat: "%Y/%m/%d"
}
};
$.plot($("#chart"), readings, chartConfig);
I want the x-axis ticks to display dates (e.g. 2013/07/15), but for only a suitable number of ticks, evenly distributed across the range, to be shown so that the label text doesn't overflow (e.g. 10 ticks).
I've looked at tickSize and minTickSize but these are only 'guidelines' - above 4 ticks they have no impact in this use case.