[Feature Request] Provide option to set color and width for annotation line (#703)
[dygraphs.git] / gallery / color-visibility.js
index cf3e0e3..5e5cc96 100644 (file)
@@ -1,3 +1,5 @@
+/*global Gallery,Dygraph,data,$ */
+/*jshint unused:false */
 Gallery.register(
   'color-visibility',
   {
@@ -27,8 +29,9 @@ Gallery.register(
             visibility: [true, true, true]
           });
   
-     function change(el) {
-       g.setVisibility(el.id, el.checked);
-     }
+      $('input[type=checkbox]').click(function() {
+        var el = this;
+        g.setVisibility(el.id, el.checked);
+      });
     }
   });