From 1d412fbd66d20bd8f57d828b274764a66650a287 Mon Sep 17 00:00:00 2001 From: Julius Volz Date: Wed, 6 Feb 2013 00:46:10 +0100 Subject: [PATCH] Adjust graph sizes depending on window size. --- static/js/graph.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/static/js/graph.js b/static/js/graph.js index 9532d3d910..dc0286d74a 100644 --- a/static/js/graph.js +++ b/static/js/graph.js @@ -244,7 +244,8 @@ Prometheus.Graph.prototype.showGraph = function() { var self = this; self.rickshawGraph = new Rickshaw.Graph({ element: self.graph[0], - height: 800, + height: Math.max($(window).height() - 200, 100), + width: Math.max($(window).width() - 200, 200), renderer: (self.stacked.is(":checked") ? "stack" : "line"), interpolation: "linear", series: self.data