mirror of
https://github.com/prometheus/prometheus.git
synced 2025-03-05 20:59:13 -08:00
Adjust graph sizes depending on window size.
This commit is contained in:
parent
acb45c98f8
commit
1d412fbd66
|
@ -244,7 +244,8 @@ Prometheus.Graph.prototype.showGraph = function() {
|
||||||
var self = this;
|
var self = this;
|
||||||
self.rickshawGraph = new Rickshaw.Graph({
|
self.rickshawGraph = new Rickshaw.Graph({
|
||||||
element: self.graph[0],
|
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"),
|
renderer: (self.stacked.is(":checked") ? "stack" : "line"),
|
||||||
interpolation: "linear",
|
interpolation: "linear",
|
||||||
series: self.data
|
series: self.data
|
||||||
|
|
Loading…
Reference in a new issue