-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcreate-timeplots2.js
65 lines (58 loc) · 1.82 KB
/
create-timeplots2.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
var timeplots = [];
function onLoad() {
var eventSource = new Timeplot.DefaultEventSource();
var plotInfo0 = [
Timeplot.createPlotInfo({
id: "plot0",
dataSource: new Timeplot.ColumnSource(eventSource,1),
valueGeometry: new Timeplot.DefaultValueGeometry({
gridColor: "#000000",
axisLabelsPlacement: "left",
min: 0.015,
max: 0.035
}),
timeGeometry: new Timeplot.DefaultTimeGeometry({
gridColor: "#000000",
axisLabelsPlacement: "top"
}),
lineColor: "#e4ac00",
fillColor: "#f7d670",
roundValues: false,
showValues: true
})
];
var plotInfo1 = [
Timeplot.createPlotInfo({
id: "plot1",
dataSource: new Timeplot.ColumnSource(eventSource,2),
valueGeometry: new Timeplot.DefaultValueGeometry({
gridColor: "#000000",
axisLabelsPlacement: "left",
min: 35,
max: 55
}),
timeGeometry: new Timeplot.DefaultTimeGeometry({
gridColor: "#000000",
axisLabelsPlacement: "top"
}),
lineColor: "#a50707",
fillColor: "#ff6c6c",
roundValues: false,
showValues: true
})
];
timeplots[0] = Timeplot.create(document.getElementById("timeplot0"), plotInfo0);
timeplots[1] = Timeplot.create(document.getElementById("timeplot1"), plotInfo1);
timeplots[1].loadText("moneda.txt", "|", eventSource);
}
var resizeTimerID = null;
function onResize() {
if (resizeTimerID == null) {
resizeTimerID = window.setTimeout(function() {
resizeTimerID = null;
for (var i = 0; i < timeplots.length; i++) {
timeplots[i].repaint();
}
}, 500);
}
}