Display Timeline/linear Data In Flot
Does anyone know how to get flot to display a type of 'timeline'? E.g. Y: Person1| ----- ------- Person2| ------- ------- Person3| -- ----- ---- Person4| -------
Solution 1:
Finally found the answer. Use the configuration 'ticks'.
Answer :
//american datesvar d1 = [[(newDate("01/01/2009")).getTime(), 1], [(newDate("01/10/2009")).getTime(), 1]];
var d2 = [[(newDate("05/05/2009")).getTime(), 2], [(newDate("06/23/2009")).getTime(), 2]];
var d3 = [[(newDate("03/10/2009")).getTime(), 3], [(newDate("03/15/2009")).getTime(), 3]];
//var d1 = [[0, 5], [5, 5], null, [5, 10], [15, 10]];var placeholder = $("#placeholder");
// plot itvar plot = $.plot(placeholder, [d1,d2,d3], {
xaxis:{mode:"time", timeformat:"%b.%y"},
yaxis:{ticks:[[1, "Apple"], [2, "Microsoft"], [3, "Dell"]]}
});
Solution 2:
View the source of http://people.iola.dk/olau/flot/examples/basic.html
pay particular attention to the comment // a null signifies separate line segments
I think that should get you where you want to be.
Post a Comment for "Display Timeline/linear Data In Flot"