diff options
Diffstat (limited to 'tranches_insight/templates/index.html')
| -rw-r--r-- | tranches_insight/templates/index.html | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/tranches_insight/templates/index.html b/tranches_insight/templates/index.html new file mode 100644 index 00000000..a797bea4 --- /dev/null +++ b/tranches_insight/templates/index.html @@ -0,0 +1,28 @@ +<!doctype html> +<html> +<head> +<script type="text/javascript" src="{{ url_for('static', filename='dygraph-combined.js') }}"></script> +<script type="text/javascript" src="{{ url_for('static', filename='jquery-2.1.1.min.js') }}"></script> +</head> +<body> +<div id="graphdiv2" + style="width:800px; height:500px;"></div> +<script type="text/javascript"> + g2 = new Dygraph(document.getElementById("graphdiv2"), + [], // path to CSV file + { labels: {{labels|tojson|safe}}, + title: "Correlation numbers" } // options + ); + $.getJSON("_data", + {i:"IG",s:9, t:"10yr"}, + function(data){ + var newdata = data["data"].map(function(e){ + f = e.slice(1); + f.unshift(new Date(e[0])); + return f}); + console.log(newdata); + g2.updateOptions({'file': newdata}); + }) +</script> +</body> +</html> |
