aboutsummaryrefslogtreecommitdiffhomepage
path: root/bench/perf_monitoring/resources/chart_footer.html
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2016-12-07 14:23:49 +0100
committerGravatar Gael Guennebaud <g.gael@free.fr>2016-12-07 14:23:49 +0100
commit3855ab472f1bd523ba51122b731c4336182a3268 (patch)
treef2bcdd3797e0ce8c28b591aee836c4ef81ee9a78 /bench/perf_monitoring/resources/chart_footer.html
parent59a59fa8e725298613c55f01ef0c95c5e2e33707 (diff)
Cleanup file structure
Diffstat (limited to 'bench/perf_monitoring/resources/chart_footer.html')
-rw-r--r--bench/perf_monitoring/resources/chart_footer.html37
1 files changed, 37 insertions, 0 deletions
diff --git a/bench/perf_monitoring/resources/chart_footer.html b/bench/perf_monitoring/resources/chart_footer.html
new file mode 100644
index 000000000..8acc69f14
--- /dev/null
+++ b/bench/perf_monitoring/resources/chart_footer.html
@@ -0,0 +1,37 @@
+ /* setup the chart and its options */
+ var chart = nv.models.lineChart()
+ .color(d3.scale.category10().range())
+ .margin({left: 75, bottom: 100})
+ .forceX([0]).forceY([0]);
+
+ chart.x(function(datum){ return datum.r; })
+ .xAxis.options({
+ axisLabel: customSettings.XLABEL || 'Changeset',
+ tickFormat: d3.format('.0f')
+ });
+ chart.xAxis
+ .tickValues(changesets_count)
+ .tickFormat(function(d){return changesets[d]})
+ .rotateLabels(-90);
+
+ chart.y(function(datum){ return datum.v; })
+ .yAxis.options({
+ axisLabel: customSettings.YLABEL || 'GFlops'/*,
+ tickFormat: function(val){ return d3.format('.0f')(val) + ' GFlops'; }*/
+ });
+
+ //chart.useInteractiveGuideline(true);
+ d3.select('#chart').datum(data).call(chart);
+ var plot = d3.select('#chart > g');
+
+ /* setup the title */
+ plot.append('text')
+ .style('font-size', '24px')
+ .attr('text-anchor', 'middle').attr('x', '50%').attr('y', '20px')
+ .text(customSettings.TITLE || '');
+
+ /* ensure the chart is responsive */
+ nv.utils.windowResize(chart.update);
+ </script>
+ </body>
+</html> \ No newline at end of file