X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;f=gadget.xml;h=07a1aba0ebc63fd09ed161946e87e22e2df4d010;hb=375adb8f6d9f71808efb237246f732d10038eedc;hp=16f9419342766834860787087917787811cd2bca;hpb=90e29a7415fdbb87d6df022c0115566d52373d2a;p=dygraphs.git
diff --git a/gadget.xml b/gadget.xml
index 16f9419..07a1aba 100644
--- a/gadget.xml
+++ b/gadget.xml
@@ -10,7 +10,6 @@
screenshot="http://dygraphs.com/screenshot.png"
author_location="US"
>
- -->
@@ -29,10 +28,6 @@
-
var gadgetHelper = null;
var table = null;
+ var kPadding = 5; // pixels of padding on any side of the chart.
_IG_RegisterOnloadHandler(loadVisualizationAPI);
@@ -65,8 +61,11 @@
function sendQuery() {
var prefs = new _IG_Prefs(); // User preferences
var chartDiv = _gel('chartdiv');
- chartDiv.style.width = document.body.clientWidth + 'px';
- chartDiv.style.height = document.body.clientHeight + 'px';
+ chartDiv.style.width = (document.body.clientWidth - 2 * kPadding) + 'px';
+ chartDiv.style.height = (document.body.clientHeight - 2 * kPadding) + 'px';
+ chartDiv.style.left = kPadding + 'px';
+ chartDiv.style.top = kPadding + 'px';
+ chartDiv.style.position = 'absolute';
chart = new DateGraph.GVizChart(chartDiv);
gadgetHelper = new google.visualization.GadgetHelper();