test tweaks to facilitate conversion
[dygraphs.git] / auto_tests / tests / simple_drawing.js
index 27e9a1a..9eb23e6 100644 (file)
@@ -27,24 +27,30 @@ var ZERO_TO_FIFTY = [[ 10, 0 ] , [ 20, 50 ]];
 
 var SimpleDrawingTestCase = TestCase("simple-drawing");
 
-SimpleDrawingTestCase._origFunc = Dygraph.getContext;
+var _origFunc = Dygraph.getContext;
 SimpleDrawingTestCase.prototype.setUp = function() {
   document.body.innerHTML = "<div id='graph'></div>";
   Dygraph.getContext = function(canvas) {
-    return new Proxy(SimpleDrawingTestCase._origFunc(canvas));
+    return new Proxy(_origFunc(canvas));
   }
 };
 
 SimpleDrawingTestCase.prototype.tearDown = function() {
-  Dygraph.getContext = SimpleDrawingTestCase._origFunc;
+  Dygraph.getContext = _origFunc;
 };
 
 SimpleDrawingTestCase.prototype.testDrawSimpleRangePlusOne = function() {
   var opts = {
-    drawXGrid: false,
-    drawYGrid: false,
-    drawXAxis: false,
-    drawYAxis: false,
+    axes : {
+      x : {
+        drawGrid: false,
+        drawAxis: false,
+      },
+      y : {
+        drawGrid: false,
+        drawAxis: false,
+      }
+    },
     valueRange: [0,51] }
 
   var graph = document.getElementById("graph");
@@ -62,10 +68,16 @@ SimpleDrawingTestCase.prototype.testDrawSimpleRangePlusOne = function() {
 // See http://code.google.com/p/dygraphs/issues/detail?id=185
 SimpleDrawingTestCase.prototype.testDrawSimpleRangeZeroToFifty = function() {
   var opts = {
-    drawXGrid: false,
-    drawYGrid: false,
-    drawXAxis: false,
-    drawYAxis: false,
+    axes : {
+      x : {
+        drawGrid: false,
+        drawAxis: false,
+      },
+      y : {
+        drawGrid: false,
+        drawAxis: false,
+      }
+    },
     valueRange: [0,50] }
 
   var graph = document.getElementById("graph");
@@ -96,12 +108,20 @@ SimpleDrawingTestCase.prototype.testDrawWithAxis = function() {
  */
 SimpleDrawingTestCase.prototype.testDrawSimpleDash = function() {
   var opts = {
-      drawXGrid: false,
-      drawYGrid: false,
-      drawXAxis: false,
-      drawYAxis: false,
+    axes: {
+      x: {
+        drawGrid: false,
+        drawAxis: false
+      },
+      y: {
+        drawGrid: false,
+        drawAxis: false
+      }
+    },
+    series: {
       'Y1': {strokePattern: [25, 7, 7, 7]},
-      colors: ['#ff0000']
+    },
+    colors: ['#ff0000']
   };
 
   var graph = document.getElementById("graph");
@@ -123,10 +143,16 @@ SimpleDrawingTestCase.prototype.testDrawSimpleDash = function() {
  */
 SimpleDrawingTestCase.prototype.testDrawThickLine = function() {
   var opts = {
-    drawXGrid: false,
-    drawYGrid: false,
-    drawXAxis: false,
-    drawYAxis: false,
+    axes : {
+      x : {
+        drawGrid: false,
+        drawAxis: false,
+      },
+      y : {
+        drawGrid: false,
+        drawAxis: false,
+      }
+    },
     strokeWidth: 15,
     colors: ['#ff0000']
   };