-
Notifications
You must be signed in to change notification settings - Fork 0
/
book_adaptation_graph.html
146 lines (111 loc) · 3.7 KB
/
book_adaptation_graph.html
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
<html lang="en">
<head>
<link rel="stylesheet" href="./dist/jquery.jqplot.css">
<title>Sci-Fi Book to movie adaptations</title>
</head>
<body>
<div id="reviewed-graph" style="height:600px;"></div>
<script type="text/javascript" src="./dist/jquery.js"></script>
<script type="text/javascript" src="./dist/jquery.jqplot.min.js"></script>
<script type="text/javascript" src="./dist/plugins/jqplot.dateAxisRenderer.js"></script>
<script type="text/javascript" src="./dist/plugins/jqplot.highlighter.js"></script>
<script type="text/javascript" src="./dist/plugins/jqplot.cursor.js"></script>
<script type="text/javascript" src="./dist/plugins/jqplot.canvasTextRenderer.js"></script>
<script type="text/javascript" src="./dist/plugins/jqplot.canvasAxisLabelRenderer.js"></script>
<script type="text/javascript">
var reviewed_data = [
[1843, 1901, 'Scrooge, or, Marley\'s Ghost'],
[1843, 1951, 'Scrooge'],
[1843, 1988, 'Scrooged'],
[1843, 1992, 'A Muppet Christmas Carol'],
[1843, 1999, 'A Christmas Carol'],
[1938, 1951, 'The Thing from Another World'],
[1938, 1982, 'The Thing'],
[1938, 2011, 'The Thing - Prequel'],
[1940, 1951, 'The Day the Earth Stood Still'],
[1940, 2008, 'The Day the Earth Stood Still'],
[1951, 1962, 'Day of the Triffids'],
[1951, 1980, 'Day of the Triffids'],
[1951, 2009, 'Day of the Triffids'],
[1956, 1975, 'Death Race 2000'],
[1956, 2009, 'Death Race'],
[1957, 1958, 'The Fly'],
[1957, 1986, 'The Fly'],
[1963, 1968, 'Planet of the Apes'],
[1963, 2001, 'Planet of the Apes'],
[1963, 1988, 'They Live'],
[1969, 1975, 'A Boy and His Dog'],
[1979, 1985, 'Enemy Mine'],
[1990, 1993, 'Jurassic Park'],
[1999, 2003, 'Timeline'],
[2003, 2013, 'Odd Thomas'],
[2004, 2014, 'Edge of Tomorrow'],
];
var publication_data = [
[1843, 'A Christmas Carol'],
[1938, 'Who Goes There?'],
[1940, 'Farewell to the Master'],
[1951, 'Day of the Triffids'],
[1956, 'The Racer'],
[1957, 'The Fly'],
[1963, 'Planet of the Apes'],
[1963, '8 O\'Clock In The Morning'],
[1969, 'A Boy and His Dog'],
[1979, 'Enemy Mine'],
[1990, 'Jurassic Park'],
[1999, 'Timeline'],
[2003, 'Odd Thomas'],
[2004, 'All You Need Is Kill'],
];
$.each(publication_data, function(index, datum) {
datum.splice(1, 0, datum[0]);
});
$('#reviewed-graph').html('');
var minYear = 1840;
var maxYear = 2015;
$.jqplot('reviewed-graph', [ reviewed_data, publication_data ], {
title : 'Movie Adaptation vs Book Publication Dates (Podcast)',
legend : {
show: true,
labels : ['Reviewed Movies', 'Books and Dates']
},
seriesDefaults: {
showMarker: true,
showLine: false,
},
highlighter: {
show : true,
tooltipAxes : 'y',
yvalues : 2,
formatString : '%s - %s',
},
axes : {
xaxis : {
label : 'Publication year (Books/Movies)',
labelRenderer: $.jqplot.CanvasAxisLabelRenderer,
min: minYear,
max: maxYear,
numberTicks: ((maxYear-minYear)/10)+1
},
yaxis : {
label : 'Adaptation year',
labelRenderer: $.jqplot.CanvasAxisLabelRenderer
}
}
});
var adaptation_data = [
//published, adapted, title
[1940, 1951, 'The Day the Earth Stood Still'],
[1951, 1962, 'Day of the Triffids'],
[1956, 1975, 'Death Race 2000'],
[1956, 2009, 'Death Race'],
[1957, 1958, 'The Fly'],
[1963, 1968, 'Planet of the Apes'],
[1963, 1988, 'They Live'],
[1990, 1993, 'Jurassic Park'],
[1999, 2003, 'Timeline'],
[2003, 2013, 'Odd Thomas'],
[2004, 2014, 'Edge of Tomorrow'],
];
</script>
</body>