Skip to content

Commit 8d67011

Browse files
committed
Disable chart animations
Render every graph instantly instead of animating series in, on the dashboard and all benchmark graph pages, including zoom redraws.
1 parent f3fb596 commit 8d67011

3 files changed

Lines changed: 9 additions & 7 deletions

File tree

‎source/_dashboard.html.haml‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454

5555
Highcharts.setOptions({ lang: { thousandsSep: '' } });
5656
Highcharts.chart(graphElement.attr('id'), {
57-
chart: { zoomType: 'x', type: graphType },
57+
chart: { zoomType: 'x', type: graphType, animation: false },
5858
title: { text: 'Speed (higher is better)' },
5959
yAxis: { min: 0, maxPadding: 0, title: { text: 'times' } },
6060
xAxis: { categories: categories, labels: benchmarkLinkLabels },
@@ -66,7 +66,7 @@
6666
}
6767
},
6868
series: series,
69-
plotOptions: { series: { animation: { duration: 400 } } }
69+
plotOptions: { series: { animation: false } }
7070
});
7171
}
7272

@@ -89,7 +89,7 @@
8989
var categories = dashboard[category]['benchmarks'];
9090

9191
Highcharts.chart(graphElement.attr('id'), {
92-
chart: { zoomType: 'x', type: graphType },
92+
chart: { zoomType: 'x', type: graphType, animation: false },
9393
title: { text: 'Memory (lower is better)' },
9494
yAxis: {
9595
min: 0,
@@ -115,7 +115,7 @@
115115
}
116116
},
117117
series: series,
118-
plotOptions: { series: { animation: { duration: 400 } } }
118+
plotOptions: { series: { animation: false } }
119119
});
120120
}
121121

‎source/benchmarks/ruby.html.haml‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@
5353
Highcharts.chart(graphElement.attr('id'), {
5454
chart: {
5555
zoomType: 'x',
56+
animation: false,
5657
type: type
5758
},
5859
title: {
@@ -86,7 +87,7 @@
8687
series: series,
8788
plotOptions: {
8889
series: {
89-
animation: { duration: 400 }
90+
animation: false
9091
}
9192
}
9293
});

‎source/javascripts/site.js‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ var RubyBench = (function() {
2323
var defaultConfig = {
2424
chart: {
2525
zoomType: 'x',
26-
type: options.graphType || 'line'
26+
type: options.graphType || 'line',
27+
animation: false
2728
},
2829
title: {
2930
text: options.title || ''
@@ -41,7 +42,7 @@ var RubyBench = (function() {
4142
series: options.series || [],
4243
plotOptions: {
4344
series: {
44-
animation: { duration: 400 }
45+
animation: false
4546
},
4647
line: {
4748
connectNulls: options.connectNulls !== undefined ? options.connectNulls : true

0 commit comments

Comments
 (0)