aboutsummaryrefslogtreecommitdiffstats
path: root/src/templates
diff options
context:
space:
mode:
authorParker Berberian <pberberian@iol.unh.edu>2020-03-16 18:52:03 +0000
committerGerrit Code Review <gerrit@opnfv.org>2020-03-16 18:52:03 +0000
commitd5b4f4c77534824430fd8e2d3f15e5f7ed6303f5 (patch)
tree8bd6fffb858840d6307631aefdd5cf4c721c6c65 /src/templates
parent0db3a84d9d9ed213983a517efd35c339537ef472 (diff)
parentaaff0c1a5abc850db49dc72a79abb581be8cfcfc (diff)
Merge "Fixed a few bugs for the stats functions and created a few tests."
Diffstat (limited to 'src/templates')
-rw-r--r--src/templates/base/booking/stats.html15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/templates/base/booking/stats.html b/src/templates/base/booking/stats.html
index a78f793..4c06b71 100644
--- a/src/templates/base/booking/stats.html
+++ b/src/templates/base/booking/stats.html
@@ -5,20 +5,26 @@
{{ block.super }}
<script src="{% static "node_modules/plotly.js-dist/plotly.js" %}"></script>
<script>
+
function drawGraph(data, graph_id, graph_title){
var container = document.getElementById(graph_id);
var plot_data = { x: data[0],
y: data[1],
- fill: "tonexty",
+ line: {shape: "hv"},
type: "scatter",
- mode: "none",
+ mode: "lines+makers",
};
var layout = {
- title: graph_title
+ title: graph_title,
+ yaxis: {
+ rangemode: 'tozero',
+ autorange: true
+ }
};
Plotly.newPlot(container, [plot_data], layout);
}
-function getData(){
+
+function getData() {
var req = new XMLHttpRequest();
var url = "/booking/stats/json";
var day_input = document.getElementById("number_days");
@@ -37,6 +43,7 @@ function getData(){
req.open("GET", url, true);
req.send();
}
+
</script>
{% endblock %}