diff --git a/html/ajax_setresolution.php b/html/ajax_setresolution.php
new file mode 100644
index 0000000000..3bf071e52a
--- /dev/null
+++ b/html/ajax_setresolution.php
@@ -0,0 +1,9 @@
+
diff --git a/html/includes/print-graphrow.inc.php b/html/includes/print-graphrow.inc.php
index 2ee411551a..3a536c8493 100644
--- a/html/includes/print-graphrow.inc.php
+++ b/html/includes/print-graphrow.inc.php
@@ -37,6 +37,17 @@ else {
);
}//end if
+if($_SESSION['screen_width'])
+{
+ $graph_array['width'] = $_SESSION['screen_width']/5.5;
+}
+
+if($_SESSION['screen_height'])
+{
+ $graph_array['height'] = $_SESSION['screen_height']/6;
+}
+
+
$graph_array['to'] = $config['time']['now'];
$graph_data = array();
diff --git a/html/js/librenms.js b/html/js/librenms.js
index 9bffaffcaf..d9f74ec077 100644
--- a/html/js/librenms.js
+++ b/html/js/librenms.js
@@ -155,3 +155,7 @@ $(document).on("click", '.collapse-neighbors', function(event)
continued.toggle();
});
+$(function() {
+ $.post('ajax_setresolution.php', { width: $(window).width() , height:$(window).height() }, function(json) {
+ },'json');
+});