1 | ## jquery.flot.absRelTime.js
|
2 |
|
3 | This plugin is used to format the time axis in absolute time representation as
|
4 | well as relative time representation.
|
5 |
|
6 | It supports the following options:
|
7 | ```js
|
8 | xaxis: {
|
9 | timezone: null, // "browser" for local to the client or timezone for timezone-js
|
10 | timeformat: null, // format string to use
|
11 | twelveHourClock: false, // 12 or 24 time in time mode
|
12 | monthNames: null // list of names of months
|
13 | }
|
14 | ```
|
15 |
|
16 | Depending upon the timeformat axis parameter value, the axis tick formatter will
|
17 | choose between an absolute time representation if the value is '%A' or
|
18 | relative time for timeformat '%r'.
|
19 |
|
20 | If the format for an axis is 'time', inside processOptions hook the tickGenerator
|
21 | and tickFormatter of the axis will be overrided with the custom ones used by time axes.
|
22 |
|
23 | The formatted values look like in the example bellow:
|
24 |
|
25 | |format|value(s)|formatted value(s)|
|
26 | |------|----:|--------------:|
|
27 | |Absolute time|0|12:00:00 AM 1/1/0001|
|
28 | |Absolute time|300|12:05:00 AM 1/1/0001|
|
29 | |Relative Time|0, 300, 600|00:00:00, 00:05:00, 00:10:00|
|
30 | |Relative Time|300, 600, 900|00:00:00, 00:05:00, 00:10:00|
|
31 |
|
32 | ### Relative time axis
|
33 | A relative time axis will show the time values with respect to the first data sample.
|
34 | Basically, the first datapoint from the points array will be considered time 00:00:00:00.
|
35 | If the difference between two datapoints is small, the milliseconds will apear.
|
36 | Otherwise, the time representation will contain only the hour, minute and second.
|
37 |
|
38 | ### Absolute time axis
|
39 | The absolute time representation contains, beside the hours, minutes and seconds
|
40 | corresponding to the sample the date and year.
|
41 | The value will be splitted on two rows, where the first row is the time and
|
42 | the the second one the date in gregorian date format.
|