Merge branch 'master' of github.com:ornicar/lila

* 'master' of github.com:ornicar/lila:
  Fix bold tag
  Show mid/end-game in advantage chart
This commit is contained in:
Thibault Duplessis 2014-11-09 09:45:27 +01:00
commit 873aec310c

View file

@ -63,6 +63,9 @@ $(function() {
$('#adv_chart').each(function() {
var $this = $(this);
var cpMax = parseInt($this.data('max'), 10) / 100;
var mid = parseInt($this.data('division-mid'));
var end = parseInt($this.data('division-end'));
$(this).highcharts(mergeDefaults({
series: [{
name: 'Advantage',
@ -120,7 +123,53 @@ $(function() {
title: noText,
labels: disabled,
lineWidth: 0,
tickWidth: 0
tickWidth: 0,
plotLines: [
{
label: {
text: 'Opening',
verticalAlign: 'top',
align: 'left',
x: 10,
style: {
color: '#aaa',
fontWeight: 'bold'
}
},
color: '#30cc4d',
width: 2,
value: 0
},
{
label: {
text: 'Mid-Game',
verticalAlign: 'top',
align: 'left',
x: 10,
style: {
color: '#aaa',
fontWeight: 'bold'
}
},
color: '#3093cc',
width: (mid == null)? 0 : 2,
value: mid
},
{
label: {
text: 'End-Game',
verticalAlign: 'top',
align: 'left',
x: 10,
style: {
color: '#aaa',
fontWeight: 'bold'
}
},
color: '#cc9730',
width: (end == null)? 0 : 2,
value: end
}]
},
yAxis: {
min: -cpMax,