|
@@ -9,6 +9,7 @@
|
9
|
9
|
<script src="data.php" type="text/javascript"></script>
|
10
|
10
|
<script type="text/javascript">
|
11
|
11
|
var previousPoint = null;
|
|
12
|
+ var plots = {};
|
12
|
13
|
var months = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];
|
13
|
14
|
|
14
|
15
|
function showTooltip(x, y, contents) {
|
|
@@ -86,7 +87,7 @@
|
86
|
87
|
|
87
|
88
|
seriesData.sort(function(a, b) { return b.data - a.data; });
|
88
|
89
|
|
89
|
|
- $.plot($('#expense'), seriesData, {
|
|
90
|
+ plots.expense = $.plot($('#expense'), seriesData, {
|
90
|
91
|
series: { pie: { show: true, innerRadius: 0.5, highlight: { opacity: 0.5 } } },
|
91
|
92
|
grid: { clickable: true }
|
92
|
93
|
});
|
|
@@ -110,7 +111,7 @@
|
110
|
111
|
transData[1].data.push([timestamp, sum[1]]);
|
111
|
112
|
});
|
112
|
113
|
|
113
|
|
- $.plot($('#history'), transData, {
|
|
114
|
+ plots.history = $.plot($('#history'), transData, {
|
114
|
115
|
xaxis: { mode: 'time', timeformat: '%y/%m'},
|
115
|
116
|
series: {
|
116
|
117
|
lines: { show: true },
|
|
@@ -163,12 +164,21 @@
|
163
|
164
|
</script>
|
164
|
165
|
<style type="text/css">
|
165
|
166
|
.categoryIgnored td { color: gray; }
|
166
|
|
- .left { width: 45%; float: left; }
|
167
|
|
- .right { margin-left: 50%; }
|
|
167
|
+ .left { width: 45%; padding: 20px; float: left; }
|
|
168
|
+ .right { margin-left: 50%; padding: 20px; }
|
|
169
|
+ body { margin: 0; font-family: sans-serif; }
|
|
170
|
+ #header { background: url('res/gradient.png') repeat-x; height: 100px; margin: 0 0 10px 0; overflow: hidden; z-index: 0; }
|
|
171
|
+ #header h1 { color: white; margin: 0; font-size: 60px; position: absolute; top: 42px; left: 20px; z-index: 2; }
|
|
172
|
+ #headershadow { font-size: 60px; position: absolute; top: 42px; left: 25px; font-weight: bold; z-index: 1; }
|
168
|
173
|
h2 { margin-top: 0; }
|
169
|
174
|
</style>
|
170
|
175
|
</head>
|
171
|
176
|
<body>
|
|
177
|
+ <div id="header">
|
|
178
|
+ <h1>Money Analyser</h1>
|
|
179
|
+ </div>
|
|
180
|
+ <span id="headershadow">Money Analyser</span>
|
|
181
|
+
|
172
|
182
|
<div class="left">
|
173
|
183
|
<h2>Transaction History</h2>
|
174
|
184
|
<div id="history" style="width: 600px; height: 300px;"></div>
|