-
Notifications
You must be signed in to change notification settings - Fork 1
/
karma-prettybrowser-reporter.js
60 lines (58 loc) · 1.63 KB
/
karma-prettybrowser-reporter.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
$(function(){
$("td[colspan=6]").find("table").hide();
$("table[class=browsers]").click(function(event){
event.stopPropagation();
var $target=$(event.target);
$target.closest("tr").next().find("table").slideToggle();
});
});
$(function () {
$('#browser-pass-fail-container').highcharts({
chart: {
plotBackgroundColor: null,
plotBorderWidth: null,
plotShadow: false,
type: 'pie'
},
title: {
text: 'Browsers Pass/Fail Stats'
},
tooltip: {
pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>'
},
plotOptions: {
pie: {
allowPointSelect: true,
cursor: 'pointer',
dataLabels: {
enabled: true,
format: '<b>{point.name}</b>: {point.percentage:.1f} %',
style: {
color: (Highcharts.theme && Highcharts.theme.contrastTextColor) || 'black'
}
}
}
},
series: [{
name: 'Browsers',
colorByPoint: true,
data: [{
name: 'Fail',
y: bFail*100,
color: '#FF0000'
},{
name: 'Pass',
y: bPass*100,
sliced: false,
selected: true,
color: '#00A000'
},{
name: 'Error',
y: bError*100,
sliced: false,
selected: true,
color: '#858484'
}]
}]
});
});