Commit 76a9aacf authored by Andreas Valder's avatar Andreas Valder
Browse files

made stats look better

parent ded2aab0
......@@ -21,18 +21,20 @@
dataType: "json",
error: moderator.api.handleapierror,
success: function (data) {
console.log(data);
var semester = [];
var y = [];
var x = []
for (var i=0; i < data.length; i++) {
semester.push(data[i].semester);
y.push(data[i].count);
x.push(i);
if (data[i].semester != "") {
semester.push(data[i].semester);
y.push(data[i].count);
}
}
var trace = {"y": y, "x": semester, "type": "scatter"};
console.log(trace);
Plotly.newPlot('tester', [trace]);
var layout = {
title: 'Veranstaltungen pro Semester',
showlegend: false
};
Plotly.newPlot('tester', [trace], layout, {showLink: false});
}
});
</script>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment