[Feature Request] Provide option to set color and width for annotation line (#703)
[dygraphs.git] / gallery / edge-padding.js
index deaa2fa..5956d4a 100644 (file)
@@ -1,3 +1,4 @@
+/*global Gallery,Dygraph,data */
 Gallery.register(
   'edge-padding',
   {
@@ -5,6 +6,7 @@ Gallery.register(
     title: 'Graph edge padding and axis position',
     setup: function(parent) {
       parent.innerHTML = (
+          "<style>.dygraph-legend { width: 100px; }</style>" +
           "<p>" +
           "  <b>Mode:</b>" +
           "    <input type='radio' name='mode'>use {x,y}RangePad</input>" +
@@ -38,7 +40,6 @@ Gallery.register(
 
           var g = new Dygraph(gdiv, data, {
               labels: ['x', 'A', 'B'],
-              labelDivWidth: 100,
               gridLineColor: '#ccc',
               includeZero: true,
               width: 250,
@@ -61,13 +62,15 @@ Gallery.register(
           avoidMinZero: false,
           xRangePad: 3,
           yRangePad: 10,
-          drawAxesAtZero: true})};
+          drawAxesAtZero: true});
+      };
       mode[1].onchange = function() {
         updateGraphOpts({
           avoidMinZero: true,
           xRangePad: 0,
           yRangePad: null,
-          drawAxesAtZero: false})};
+          drawAxesAtZero: false});
+      };
       mode[0].checked = true;
       mode[0].onchange();