diff --git a/mercurial/templates/gitweb/graph.tmpl b/mercurial/templates/gitweb/graph.tmpl
index ae4e6b80f0842cb5c9e8a4f6d5410f83fc3b861e_bWVyY3VyaWFsL3RlbXBsYXRlcy9naXR3ZWIvZ3JhcGgudG1wbA==..91ac8cb791255b862e75e4e1fa461470178879cb_bWVyY3VyaWFsL3RlbXBsYXRlcy9naXR3ZWIvZ3JhcGgudG1wbA== 100644
--- a/mercurial/templates/gitweb/graph.tmpl
+++ b/mercurial/templates/gitweb/graph.tmpl
@@ -41,7 +41,7 @@
 
 <div id="wrapper">
 <ul id="nodebgs"></ul>
-<canvas id="graph" width="480" height="{canvasheight}"></canvas>
+<canvas id="graph" width="{canvaswidth}" height="{canvasheight}"></canvas>
 <ul id="graphnodes"></ul>
 </div>
 
diff --git a/mercurial/templates/monoblue/graph.tmpl b/mercurial/templates/monoblue/graph.tmpl
index ae4e6b80f0842cb5c9e8a4f6d5410f83fc3b861e_bWVyY3VyaWFsL3RlbXBsYXRlcy9tb25vYmx1ZS9ncmFwaC50bXBs..91ac8cb791255b862e75e4e1fa461470178879cb_bWVyY3VyaWFsL3RlbXBsYXRlcy9tb25vYmx1ZS9ncmFwaC50bXBs 100644
--- a/mercurial/templates/monoblue/graph.tmpl
+++ b/mercurial/templates/monoblue/graph.tmpl
@@ -36,7 +36,7 @@
     <div id="noscript">The revision graph only works with JavaScript-enabled browsers.</div>
     <div id="wrapper">
         <ul id="nodebgs"></ul>
-        <canvas id="graph" width="480" height="{canvasheight}"></canvas>
+        <canvas id="graph" width="{canvaswidth}" height="{canvasheight}"></canvas>
         <ul id="graphnodes"></ul>
     </div>
 
diff --git a/mercurial/templates/paper/graph.tmpl b/mercurial/templates/paper/graph.tmpl
index ae4e6b80f0842cb5c9e8a4f6d5410f83fc3b861e_bWVyY3VyaWFsL3RlbXBsYXRlcy9wYXBlci9ncmFwaC50bXBs..91ac8cb791255b862e75e4e1fa461470178879cb_bWVyY3VyaWFsL3RlbXBsYXRlcy9wYXBlci9ncmFwaC50bXBs 100644
--- a/mercurial/templates/paper/graph.tmpl
+++ b/mercurial/templates/paper/graph.tmpl
@@ -55,7 +55,7 @@
 
 <div id="wrapper">
 <ul id="nodebgs" class="stripes2"></ul>
-<canvas id="graph" width="480" height="{canvasheight}"></canvas>
+<canvas id="graph" width="{canvaswidth}" height="{canvasheight}"></canvas>
 <ul id="graphnodes"></ul>
 </div>
 
diff --git a/mercurial/templates/spartan/graph.tmpl b/mercurial/templates/spartan/graph.tmpl
index ae4e6b80f0842cb5c9e8a4f6d5410f83fc3b861e_bWVyY3VyaWFsL3RlbXBsYXRlcy9zcGFydGFuL2dyYXBoLnRtcGw=..91ac8cb791255b862e75e4e1fa461470178879cb_bWVyY3VyaWFsL3RlbXBsYXRlcy9zcGFydGFuL2dyYXBoLnRtcGw= 100644
--- a/mercurial/templates/spartan/graph.tmpl
+++ b/mercurial/templates/spartan/graph.tmpl
@@ -32,7 +32,7 @@
 
 <div id="wrapper">
 <ul id="nodebgs"></ul>
-<canvas id="graph" width="480" height="{canvasheight}"></canvas>
+<canvas id="graph" width="{canvaswidth}" height="{canvasheight}"></canvas>
 <ul id="graphnodes"></ul>
 </div>
 
diff --git a/tests/test-hgweb-commands.t b/tests/test-hgweb-commands.t
index ae4e6b80f0842cb5c9e8a4f6d5410f83fc3b861e_dGVzdHMvdGVzdC1oZ3dlYi1jb21tYW5kcy50..91ac8cb791255b862e75e4e1fa461470178879cb_dGVzdHMvdGVzdC1oZ3dlYi1jb21tYW5kcy50 100644
--- a/tests/test-hgweb-commands.t
+++ b/tests/test-hgweb-commands.t
@@ -1751,7 +1751,7 @@
   
   <div id="wrapper">
   <ul id="nodebgs"></ul>
-  <canvas id="graph" width="480" height="168"></canvas>
+  <canvas id="graph" width="39" height="168"></canvas>
   <ul id="graphnodes"></ul>
   </div>
   
diff --git a/tests/test-hgweb-empty.t b/tests/test-hgweb-empty.t
index ae4e6b80f0842cb5c9e8a4f6d5410f83fc3b861e_dGVzdHMvdGVzdC1oZ3dlYi1lbXB0eS50..91ac8cb791255b862e75e4e1fa461470178879cb_dGVzdHMvdGVzdC1oZ3dlYi1lbXB0eS50 100644
--- a/tests/test-hgweb-empty.t
+++ b/tests/test-hgweb-empty.t
@@ -294,7 +294,7 @@
   
   <div id="wrapper">
   <ul id="nodebgs" class="stripes2"></ul>
-  <canvas id="graph" width="480" height="12"></canvas>
+  <canvas id="graph" width="39" height="12"></canvas>
   <ul id="graphnodes"></ul>
   </div>