source: code/Website/data-files/x-labels-auto-dates.txt@ 7849

Last change on this file since 7849 was 7849, checked in by dennisw, 15 years ago
File size: 1.9 KB
Line 
1{
2 "title":{
3 "text":"X Labels - Auto Dates - Every 2nd Visible",
4 "style":"{font-size: 16px; margin-top: 0; margin-bottom: 0; padding-top: 0; padding-bottom: 0; }"
5 },
6
7 "x_axis": {
8 "min": 1220245200,
9 "max": 1221368400,
10 "steps": 86400, // <-- seconds in a day
11 "labels":{
12 "rotate":345,
13 "steps":86400,
14 "visible-steps":2,
15 "text":"#date:l jS, M Y#" // <-- apply default date format to X axis labels
16 }
17 },
18
19 "elements":[
20 {
21 "type": "scatter_line",
22 "colours": ["#1f3cd0"],
23 "alpha": 0.6,
24 "border": 2,
25 "animate": 0,
26 "dot-style": {
27 "tip": "#date:d M y#<br>#y#\n(left axis)", // User formatted date
28 "type":"solid-dot"},
29
30 "width": 4,
31 "text": "Test with Unix Timestamp as X Value",
32 "values" : [
33 {"x":1220245200, "y":10}, // 1220245200 = unix time stamp for 01 Sep 2008
34 {"x":1220331600, "y":20},
35 {"x":1220418000, "y":30},
36 {"x":1220504400, "y":40},
37 {"x":1220590800, "y":50},
38 {"x":1220677200, "y":60},
39 {"x":1220763600, "y":70},
40 // skip a day -- {"x":1220850000, "y":80},
41 {"x":1220936400, "y":70},
42 {"x":1221022800, "y":60},
43 {"x":1221109200, "y":50},
44 {"x":1221195600, "y":40},
45 {"x":1221282000, "y":30},
46 {"x":1221368400, "y":20}
47 ]
48 }
49 ],
50
51 "tooltip":{
52 "shadow":false,
53 "stroke":2,
54 "mouse":0,
55 "colour":"#00d000",
56 "background":"#d0d0ff",
57 "title":"{font-size: 14px; color: #905050;}",
58 "body":"{font-size: 10px; font-weight: bold; color: #9090ff;}",
59 "text":"title<br>body"
60 },
61
62 "y_axis": {
63 "min": 0,
64 "max": 100,
65 "stroke": 2,
66 "steps" : 10,
67 "offset": 0
68 }
69}
Note: See TracBrowser for help on using the repository browser.