Skip to content

Commit a96ef2b

Browse files
authored
Merge pull request #59 from mattip/comparison
Refresh plotting routines
2 parents b200f16 + 17a96fb commit a96ef2b

26 files changed

Lines changed: 953 additions & 1148 deletions

codespeed/static/css/dygraph.css

Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
/**
2+
* Default styles for the dygraphs charting library.
3+
*/
4+
5+
.dygraph-legend {
6+
position: absolute;
7+
font-size: 14px;
8+
z-index: 10;
9+
width: 250px; /* labelsDivWidth */
10+
/*
11+
dygraphs determines these based on the presence of chart labels.
12+
It might make more sense to create a wrapper div around the chart proper.
13+
top: 0px;
14+
right: 2px;
15+
*/
16+
background: white;
17+
line-height: normal;
18+
text-align: left;
19+
overflow: hidden;
20+
}
21+
22+
.dygraph-legend[dir="rtl"] {
23+
text-align: right;
24+
}
25+
26+
/* styles for a solid line in the legend */
27+
.dygraph-legend-line {
28+
display: inline-block;
29+
position: relative;
30+
bottom: .5ex;
31+
padding-left: 1em;
32+
height: 1px;
33+
border-bottom-width: 2px;
34+
border-bottom-style: solid;
35+
/* border-bottom-color is set based on the series color */
36+
}
37+
38+
/* styles for a dashed line in the legend, e.g. when strokePattern is set */
39+
.dygraph-legend-dash {
40+
display: inline-block;
41+
position: relative;
42+
bottom: .5ex;
43+
height: 1px;
44+
border-bottom-width: 2px;
45+
border-bottom-style: solid;
46+
/* border-bottom-color is set based on the series color */
47+
/* margin-right is set based on the stroke pattern */
48+
/* padding-left is set based on the stroke pattern */
49+
}
50+
51+
.dygraph-roller {
52+
position: absolute;
53+
z-index: 10;
54+
}
55+
56+
/* This class is shared by all annotations, including those with icons */
57+
.dygraph-annotation {
58+
position: absolute;
59+
z-index: 10;
60+
overflow: hidden;
61+
}
62+
63+
/* This class only applies to annotations without icons */
64+
/* Old class name: .dygraphDefaultAnnotation */
65+
.dygraph-default-annotation {
66+
border: 1px solid black;
67+
background-color: white;
68+
text-align: center;
69+
}
70+
71+
.dygraph-axis-label {
72+
/* position: absolute; */
73+
/* font-size: 14px; */
74+
z-index: 10;
75+
line-height: normal;
76+
overflow: hidden;
77+
color: black; /* replaces old axisLabelColor option */
78+
}
79+
80+
.dygraph-axis-label-x {
81+
}
82+
83+
.dygraph-axis-label-y {
84+
}
85+
86+
.dygraph-axis-label-y2 {
87+
}
88+
89+
.dygraph-title {
90+
font-weight: bold;
91+
z-index: 10;
92+
text-align: center;
93+
/* font-size: based on titleHeight option */
94+
}
95+
96+
.dygraph-xlabel {
97+
text-align: center;
98+
/* font-size: based on xLabelHeight option */
99+
}
100+
101+
/* For y-axis label */
102+
.dygraph-label-rotate-left {
103+
text-align: center;
104+
/* See http://caniuse.com/#feat=transforms2d */
105+
transform: rotate(90deg);
106+
-webkit-transform: rotate(90deg);
107+
-moz-transform: rotate(90deg);
108+
-o-transform: rotate(90deg);
109+
-ms-transform: rotate(90deg);
110+
}
111+
112+
/* For y2-axis label */
113+
.dygraph-label-rotate-right {
114+
text-align: center;
115+
/* See http://caniuse.com/#feat=transforms2d */
116+
transform: rotate(-90deg);
117+
-webkit-transform: rotate(-90deg);
118+
-moz-transform: rotate(-90deg);
119+
-o-transform: rotate(-90deg);
120+
-ms-transform: rotate(-90deg);
121+
}

codespeed/static/css/main.css

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,19 @@ div.about_content { text-align: left; }
234234
.boxbody input { margin-left: 0; vertical-align: top; }
235235
#options li { margin-bottom: 0.8em; }
236236
.seriescolor { float: right; margin-top: 2px; height: 13px; width: 14px; }
237+
.compplot-wrap { display: inline-block; }
237238
a.togglefold { font-size: normal; color: #000000; }
239+
a.togglefold::before {
240+
content: '▶';
241+
display: inline-block;
242+
margin-right: 0.3em;
243+
font-size: 0.7em;
244+
transition: transform 0.2s ease;
245+
transform: rotate(90deg);
246+
}
247+
a.togglefold.folded::before {
248+
transform: rotate(0deg);
249+
}
238250
a.checkall, a.uncheckall { font-size: small; color: #AAAAAA; }
239251

240252
p.errormessage { line-height: 10em; margin-bottom: 10em; }
@@ -456,13 +468,25 @@ div.miniplot {
456468
float: left;
457469
height: 130px;
458470
width: 23%;
471+
border: 1px solid #9DADC6;
459472
-moz-border-radius: 10px;
460473
-webkit-border-radius: 10px;
461474
border-radius: 10px;
462475
}
463476
div.miniplot:hover { background-color: #F1F1F1; }
464-
.jqplot-highlighter-tooltip {
465-
-moz-border-radius: 10px; -webkit-border-radius: 10px; border-radius: 10px;
477+
478+
#dygraph-tooltip {
479+
display: none;
480+
position: absolute;
481+
background: rgba(255,255,255,0.92);
482+
border: 1px solid #9DADC6;
483+
border-radius: 6px;
484+
padding: 6px 10px;
485+
font-size: 12px;
486+
pointer-events: none;
487+
z-index: 100;
488+
white-space: nowrap;
489+
box-shadow: 2px 2px 4px rgba(0,0,0,0.15);
466490
}
467491

468492
div.compplot {

codespeed/static/js/chart.umd.min.js

Lines changed: 14 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

codespeed/static/js/codespeed.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,14 @@ $(function() {
4343

4444
$('.togglefold').each(function() {
4545
var lis = $(this).parent().children("li");
46+
var allUnchecked = lis.find("input[type='checkbox']").filter(':checked').length === 0;
47+
if (allUnchecked) {
48+
lis.hide();
49+
$(this).addClass('folded');
50+
}
4651
$(this).click(function() {
4752
lis.slideToggle();
53+
$(this).toggleClass('folded');
4854
return false;
4955
});
5056
});

0 commit comments

Comments
 (0)