I am trying to create a line chart of time (x-axis) against value (y-axis) from data that:
- Can contain gaps (no data) for certain intervals.
- Can have non-consistent intervals.
E.g. Data can look like:
(time, value)
(13:00, 3)
(14:00, 10)
(14.30, 5) <--- change of interval here
(15:00, 8)
.... no data here
(18:00, 12)
(18:30, 9)
(19:00, 3)
Note:
Change in interval from 1 hr -> 30 mins from 14:00 onwards.
No data between 15:00 and 18:00.
Is there a way to represent this change in interval and gaps in the series data within a chart?
DateAxis doesn't use time I believe, so don't think I can use it.
Thanks in advance.
Cheers,
Glen
Chart: Gaps in series values and non-uniform intervals
Primefaces 5.1 charts DateAxis is using http://www.jqplot.com/docs/files/plugin ... er-js.html , which seems to support time as far as I can see.
I would try something like:
If you need time without a date on the axis, I would try to set the Axis format to just printing the time, not the date.
I would try something like:
Code: Select all
series.set("2014-01-01 13:00:00", 3);
series.set("2014-01-01 14:00:00", 10);
series.set("2014-01-01 14:30:00", 5);
series.set("2014-01-01 15:00:00", 8);
series.set("2014-01-01 16:00:00", null);
series.set("2014-01-01 17:00:00", null);
series.set("2014-01-01 18:00:00", 12);
Greetings,
Steve
Steve
-
- Information
-
Who is online
Users browsing this forum: No registered users and 45 guests