port over tests
authorDan Vanderkam <danvdk@gmail.com>
Wed, 19 Nov 2014 06:22:46 +0000 (01:22 -0500)
committerDan Vanderkam <danvdk@gmail.com>
Wed, 19 Nov 2014 06:22:46 +0000 (01:22 -0500)
tests/custom-circles.html
tests/fillGraph.html
tests/per-series.html
tests/plotters.html
tests/steps.html
tests/two-axes.html
tests/value-axis-formatters.html

index 0f0ec3c..127ec04 100644 (file)
@@ -98,7 +98,8 @@
         var shapes = [];
         var addShape = function(name, pointFn, highlightPointFn) {
           shapes.push(name);
-          opts[name] = {
+          if (!opts['series']) opts['series'] = {};
+          opts.series[name] = {
             drawPointCallback: pointFn,
             drawHighlightPointCallback: highlightPointFn
           };
index 0188dc4..2b048df 100644 (file)
@@ -59,7 +59,9 @@
           return ret;
         },
         {
-          Y1: { fillGraph: true }
+          series: {
+            Y1: { fillGraph: true }
+          }
         }
       );
     </script>
index 84730b1..4f436d6 100644 (file)
               {
                 legend: 'always',
                 strokeWidth: 2,
-                'parabola': {
-                  strokePattern: null,
-                  drawPoints: true,
-                  pointSize: 4,
-                  highlightCircleSize: 6
-                },
-                'line': {
-                  strokePattern: Dygraph.DASHED_LINE,
-                  strokeWidth: 1.0,
-                  drawPoints: true,
-                  pointSize: 1.5
-                },
-                'another line': {
-                  strokePattern: [25, 5]
-                },
-                'sine wave': {
-                  strokePattern: Dygraph.DOTTED_LINE,
-                  strokeWidth: 3,
-                  highlightCircleSize: 10
-                },
-                'sine wave2': {
-                  strokePattern: Dygraph.DOT_DASH_LINE,
-                  strokeWidth: 2,
-                  highlightCircleSize: 3
+                series: {
+                  'parabola': {
+                    strokePattern: null,
+                    drawPoints: true,
+                    pointSize: 4,
+                    highlightCircleSize: 6
+                  },
+                  'line': {
+                    strokePattern: Dygraph.DASHED_LINE,
+                    strokeWidth: 1.0,
+                    drawPoints: true,
+                    pointSize: 1.5
+                  },
+                  'another line': {
+                    strokePattern: [25, 5]
+                  },
+                  'sine wave': {
+                    strokePattern: Dygraph.DOTTED_LINE,
+                    strokeWidth: 3,
+                    highlightCircleSize: 10
+                  },
+                  'sine wave2': {
+                    strokePattern: Dygraph.DOT_DASH_LINE,
+                    strokeWidth: 2,
+                    highlightCircleSize: 3
+                  }
                 }
               }
           );
               data,
               {
                 strokeWidth: 2,
-                'parabola': {
-                  strokeWidth: 0.0,
-                  drawPoints: true,
-                  pointSize: 4,
-                  highlightCircleSize: 6
-                },
-                'line': {
-                  strokeWidth: 1.0,
-                  drawPoints: true,
-                  pointSize: 1.5
-                },
-                'sine wave': {
-                  strokeWidth: 3,
-                  highlightCircleSize: 10
-                },
-                'sine wave2': {
-                  strokePattern: [10, 2, 5, 2],
-                  strokeWidth: 2,
-                  highlightCircleSize: 3
+                series: {
+                  'parabola': {
+                    strokeWidth: 0.0,
+                    drawPoints: true,
+                    pointSize: 4,
+                    highlightCircleSize: 6
+                  },
+                  'line': {
+                    strokeWidth: 1.0,
+                    drawPoints: true,
+                    pointSize: 1.5
+                  },
+                  'sine wave': {
+                    strokeWidth: 3,
+                    highlightCircleSize: 10
+                  },
+                  'sine wave2': {
+                    strokePattern: [10, 2, 5, 2],
+                    strokeWidth: 2,
+                    highlightCircleSize: 3
+                  }
                 }
               }
           );
index 104ab78..5bbbf15 100644 (file)
@@ -246,11 +246,13 @@ var candleData = "Date,Open,Close,High,Low\n" +
             {
               labels: ['Date', 'A', 'B'],
               includeZero: true,
-              "A": {
-                strokeWidth: 2
-              },
-              "B": {
-                plotter: barChartPlotter
+              series: {
+                "A": {
+                  strokeWidth: 2
+                },
+                "B": {
+                  plotter: barChartPlotter
+                }
               }
             });
 
@@ -314,12 +316,14 @@ var candleData = "Date,Open,Close,High,Low\n" +
             NoisyData(),
             {
               errorBars: true,
-              'A': {
-                plotter: Dygraph.Plotters.errorPlotter
-              },
-              'B': {
-                plotter: Dygraph.Plotters.linePlotter,
-                strokePattern: Dygraph.DASHED_LINE
+              series: {
+                'A': {
+                  plotter: Dygraph.Plotters.errorPlotter
+                },
+                'B': {
+                  plotter: Dygraph.Plotters.linePlotter,
+                  strokePattern: Dygraph.DASHED_LINE
+                }
               }
             });
 
index 8c58811..dd9ff5c 100644 (file)
         labels: ["Date","GapSeries1","GapSeries2"],
         showRoller: true,
         stepPlot: true,
-        GapSeries2: { axis: {} }
+        series: {
+          GapSeries2: {
+            axis: 'y2'
+          }
+        }
       }
     );
     </script>
index e3e29ff..24f717a 100644 (file)
           data,
           {
             labels: [ 'Date', 'Y1', 'Y2', 'Y3', 'Y4' ],
-            'Y3': {
-              axis: {
-              }
-            },
-            'Y4': {
-              axis: 'Y3'  // use the same y-axis as series Y3
+            series: {
+              'Y3': {
+                axis: 'y2'
+              },
+              'Y4': {
+                axis: 'y2'
+              },
             },
             axes: {
               y2: {
index 193c48e..184101e 100644 (file)
             labels: [ 'Date', 'Y1', 'Y2', 'Y3', 'Y4' ],
             width: 640,
             height: 350,
-            'Y3': {
-              axis: {
-              }
-            },
-            'Y4': {
-              axis: 'Y3'  // use the same y-axis as series Y3
+            series: {
+              'Y3': { axis: 'y2' },
+              'Y4': { axis: 'y2' }
             },
             xAxisLabelWidth: 100,
             yAxisLabelWidth: 100,