aboutsummaryrefslogtreecommitdiffstats
path: root/risk_insight/static/indices.js
diff options
context:
space:
mode:
Diffstat (limited to 'risk_insight/static/indices.js')
-rw-r--r--risk_insight/static/indices.js35
1 files changed, 0 insertions, 35 deletions
diff --git a/risk_insight/static/indices.js b/risk_insight/static/indices.js
deleted file mode 100644
index ea5786af..00000000
--- a/risk_insight/static/indices.js
+++ /dev/null
@@ -1,35 +0,0 @@
-g = new Dygraph(document.getElementById("graph"),
- [], // path to CSV file
- { labels: [],
- title: "Index quotes",
- showRoller: true,
- legend: "always"} // options
- );
-
-function update_graph(g) {
- return function(e) {
- var payload = {i: document.getElementById('index').value,
- s: document.getElementById('series').value,
- t: document.getElementById('tenor').value};
- $.getJSON("_data_indices",
- payload,
- function(data){
- var newdata = data["data"].map(function(e){
- f = e.slice(1);
- f.unshift(new Date(e[0]));
- return f});
- g.updateOptions({'file': newdata, 'labels': data['labels']});
- });
- }
-};
-
-
-document.getElementById('index').
- addEventListener('change', update_graph(g));
-document.getElementById('series').
- addEventListener('change', update_graph(g));
-document.getElementById('tenor').
- addEventListener('change', update_graph(g));
-
-var event = new Event('change');
-document.getElementById('index').dispatchEvent(event);