...
 
Commits (8)
......@@ -21,8 +21,8 @@
text-align: center;
}
div.limitgrowth {
height: 250px;
width: 250px;
height: 275px;
width: 275px;
margin: 0 auto;
}
[class*="col-"] {
......@@ -30,8 +30,8 @@ div.limitgrowth {
padding: 5px;
margin: 0px;
}
canvas {
height: 200px;
.table-responsive {
border: none;
}
/* styles for tablet likes */
......@@ -78,8 +78,8 @@ canvas {
padding: 15px;
}
div.limitgrowth {
width: 400px;
height: 400px;
width: 450px;
height: 450px;
}
[class*="col-"] {
padding: 15px;
......@@ -104,8 +104,8 @@ canvas {
padding: 15px;
}
div.limitgrowth {
width: 400px;
height: 400px;
width: 500px;
height: 500px;
}
[class*="col-"] {
padding: 15px;
......
function doughnutChart(context, labelList, dataSets) {
new Chart(context, {
type: 'doughnut',
data: {
labels: labelList,
datasets: dataSets
},
options: {
events: ["mousemove", "mouseenter"],
cutoutPercentage: 40,
animation: {
duration: 0
},
legend: {
display: false
},
}
});
}
function barChart(chartID, labelList, dataSets) {
new Chart($(chartID)[0].getContext("2d"), {
type: 'bar',
......@@ -28,6 +47,13 @@ function barChart(chartID, labelList, dataSets) {
};
function scatterChart(chartID, dataSets) {
var layout = {
xaxis: {
fixedrange: true
},
yaxis: {
fixedrange: true
},
autosize: true,
showlegend: false,
margin: {
l: 40,
......@@ -36,13 +62,41 @@ function scatterChart(chartID, dataSets) {
t: 10,
pad: 4,
autoexpand: false
}
},
hovermode: 'closest'
};
var options = {
displaylogo: false,
displaymodebar: true
displaymodebar: true,
modeBarButtonsToRemove: [
'sendDataToCloud',
'toImage',
'select2d',
'lasso2d',
'toggleSpikelines'
]
};
Plotly.plot(chartID, dataSets, layout, options);
/*
var traceVisibility = new Map();
$('#' + chartID)[0].on('plotly_click', function(data) {
var name = data.points[0].data.name,
traceID;
for (var i = 0; i < dataSetsGlicko2History.length; i++) {
if (dataSetsGlicko2History[i].name == name) {
traceID = i;
}
}
if (traceVisibility.has(name)) {
traceVisibility.delete(name);
Plotly.restyle('chart_glicko2_history', {visible: 'legendonly'}, traceID);
} else {
traceVisibility.set(name, true);
Plotly.restyle('chart_glicko2_history', {visible: true}, traceID);
}
});
*/
};
function toggleGlicko2ConfidenceIntervalCheckbox(element)
......
......@@ -3,16 +3,6 @@
<head>
<title>SkatMan</title>
<meta charset="utf-8">
<!-- static included libs -->
<script src="https://code.jquery.com/jquery-3.2.1.min.js" integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4=" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.6.0/Chart.bundle.min.js" integrity="sha256-VNbX9NjQNRW+Bk02G/RO6WiTKuhncWI4Ey7LkSbE+5s=" crossorigin="anonymous"></script>
<script src="https://cdn.plot.ly/plotly-latest.min.js" integrity="sha384-q6SXokqD30P32ZUtDragvOIy6+rKuri6FHC5LqgHwzEhDPQXWFLmWCbgw/FJ1D1j" crossorigin="anonymous"></script>
<!-- my own scripts / css -->
<link rel="stylesheet" href="{% static 'styles.css' %}">
<link rel="stylesheet" href="{% static 'responsive.css' %}">
<script src="{% static 'skat.js' %}"></script>
<!-- favicons -->
<link rel="apple-touch-icon" sizes="120x120" href="{% static "apple-touch-icon.png" %}">
<link rel="icon" type="image/png" sizes="32x32" href="{% static "favicon-32x32.png" %}">
......@@ -21,6 +11,15 @@
<link rel="mask-icon" href="{% static "safari-pinned-tab.svg" %}" color="#5bbad5">
<meta name="theme-color" content="#ffffff">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- css -->
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<link rel="stylesheet" href="{% static 'styles.css' %}">
<link rel="stylesheet" href="{% static 'responsive.css' %}">
<!-- js -->
<script src="https://code.jquery.com/jquery-3.2.1.min.js" integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4=" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.6.0/Chart.bundle.min.js" integrity="sha256-VNbX9NjQNRW+Bk02G/RO6WiTKuhncWI4Ey7LkSbE+5s=" crossorigin="anonymous"></script>
<script src="https://cdn.plot.ly/plotly-latest.min.js" crossorigin="anonymous"></script>
<script src="{% static 'skat.js' %}"></script>
{% block script %}{% endblock %}
</head>
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -173,7 +173,7 @@ def flush_cache(request):
if request.user.is_staff:
cache.invalidate_caches()
return redirect('playerstats')
return redirect('eventstats')
@login_required
def create_player(request):
......@@ -243,7 +243,7 @@ def select_iteration(request):
it = models.Iteration.objects.get(name=it_name)
request.user.player.current_it = it
request.user.player.save()
return redirect('playerstats')
return redirect('eventstats')
else:
context['user_message'] = "Invalid form data"
......