Merge branch 'master' of https://github.com/danvk/dygraphs into no-width-no-work
authorRobert Konigsberg <konigsberg@google.com>
Thu, 22 Nov 2012 17:37:21 +0000 (12:37 -0500)
committerRobert Konigsberg <konigsberg@google.com>
Thu, 22 Nov 2012 17:37:21 +0000 (12:37 -0500)
auto_tests/misc/local.html
auto_tests/tests/callback.js
auto_tests/tests/multiple_axes.js
dygraph-dev.js
dygraph-options.js [new file with mode: 0644]
dygraph.js
gallery/highlighted-series.js
tests/data.js

index e35d18d..ae0b6b3 100644 (file)
@@ -8,7 +8,7 @@
   <![endif]-->
   <script type="text/javascript" src="../../dygraph-dev.js"></script>
 
-  <!-- Scripts for automated tests -->
+  <!-- Scripts for library support -->
   <script type="text/javascript" src="../lib/jquery-1.4.2.js"></script>
   <script type="text/javascript" src="../lib/Asserts.js"></script>
   <script type="text/javascript" src="fake-jstestdriver.js"></script>
@@ -16,6 +16,8 @@
   <script type="text/javascript" src="../tests/CanvasAssertions.js"></script>
   <script type="text/javascript" src="../tests/DygraphOps.js"></script>
   <script type="text/javascript" src="../tests/PixelSampler.js"></script>
+
+  <!-- Scripts for automated tests -->
   <script type="text/javascript" src="../tests/annotations.js"></script>
   <script type="text/javascript" src="../tests/axis_labels.js"></script>
   <script type="text/javascript" src="../tests/callback.js"></script>
   <script type="text/javascript" src="../tests/formats.js"></script>
   <script type="text/javascript" src="../tests/interaction_model.js"></script>
   <script type="text/javascript" src="../tests/missing_points.js"></script>
-  <script type="text/javascript" src="../tests/multiple_axes.js"></script>
   <script type="text/javascript" src="../tests/multi_csv.js"></script>
+  <script type="text/javascript" src="../tests/multiple_axes.js"></script>
   <script type="text/javascript" src="../tests/no_hours.js"></script>
+  <script type="text/javascript" src="../tests/parser.js"></script>
   <script type="text/javascript" src="../tests/pathological_cases.js"></script>
-
+  <script type="text/javascript" src="../tests/per-series.js"></script>
+  <script type="text/javascript" src="../tests/range_selector.js"></script>
   <script type="text/javascript" src="../tests/range_tests.js"></script>
   <script type="text/javascript" src="../tests/rolling_average.js"></script>
   <script type="text/javascript" src="../tests/sanity.js"></script>
-  <script type="text/javascript" src="../tests/selection.js"></script>
   <script type="text/javascript" src="../tests/scientific_notation.js"></script>
   <script type="text/javascript" src="../tests/scrolling_div.js"></script>
+  <script type="text/javascript" src="../tests/selection.js"></script>
   <script type="text/javascript" src="../tests/simple_drawing.js"></script>
+  <script type="text/javascript" src="../tests/stacked.js"></script>
   <!--
   <script type="text/javascript" src="../tests/tickers.js"></script>
   -->
   <script type="text/javascript" src="../tests/to_dom_coords.js"></script>
-  <script type="text/javascript" src="../tests/update_while_panning.js"></script>
-  <script type="text/javascript" src="../tests/stacked.js"></script>
-  <script type="text/javascript" src="../tests/per_series.js"></script>
-  <script type="text/javascript" src="../tests/parser.js"></script>
   <script type="text/javascript" src="../tests/update_options.js"></script>
+  <script type="text/javascript" src="../tests/update_while_panning.js"></script>
   <script type="text/javascript" src="../tests/utils_test.js"></script>
 
 <style type="text/css">
index 6e59787..0e6b4fa 100644 (file)
@@ -304,7 +304,7 @@ CallbackTestCase.prototype.testClosestPointCallbackCss2 = function() {
 /**
  * Closest-point highlighting with locked series.
  */
-CallbackTestCase.prototype.testClosestPointCallbackCss1 = function() {
+CallbackTestCase.prototype.testSetSelectionLocking = function() {
   var g = runClosestTest(false, 2, 4);
 
   // Default behavior, 'b' is closest
index 05e93c7..d08ff50 100644 (file)
@@ -290,4 +290,47 @@ MultipleAxesTestCase.prototype.testValueRangePerAxisOptions = function() {
   );
   assertEquals(["40", "45", "50", "55", "60", "65", "70", "75"], getYLabelsForAxis("1"));
   assertEquals(["1M", "1.02M", "1.05M", "1.08M", "1.1M", "1.13M", "1.15M", "1.18M"], getYLabelsForAxis("2"));
-};
\ No newline at end of file
+};
+
+MultipleAxesTestCase.prototype.testDrawPointCallback = function() {
+  var data = MultipleAxesTestCase.getData();
+
+  var results = { y : {}, y2 : {}};
+  var firstCallback = function(g, seriesName, ctx, canvasx, canvasy, color, radius) {
+    results.y[seriesName] = 1; 
+    Dygraph.Circles.DEFAULT(g, seriesName, ctx, canvasx, canvasy, color, radius);
+
+  };
+  var secondCallback = function(g, seriesName, ctx, canvasx, canvasy, color, radius) {
+    results.y2[seriesName] = 1; 
+    Dygraph.Circles.TRIANGLE(g, seriesName, ctx, canvasx, canvasy, color, radius);
+  };
+
+  g = new Dygraph(
+    document.getElementById("graph"),
+    data,
+    {
+      labels: [ 'Date', 'Y1', 'Y2', 'Y3', 'Y4' ],
+      drawPoints : true,
+      pointSize : 3,
+      'Y3': {
+        axis: {
+        }
+      },
+      'Y4': {
+        axis: 'Y3'  // use the same y-axis as series Y3
+      },
+      axes: {
+        y2: {
+          drawPointCallback: secondCallback
+        }
+      },
+      drawPointCallback: firstCallback
+    }
+  );
+
+  assertEquals(1, results.y["Y1"]);
+  assertEquals(1, results.y["Y2"]);
+  assertEquals(1, results.y2["Y3"]);
+  assertEquals(1, results.y2["Y4"]);
+};
index 4ca6bb3..b90796c 100644 (file)
@@ -20,6 +20,7 @@
     "rgbcolor/rgbcolor.js",
     "stacktrace.js",
     "dashed-canvas.js",
+    "dygraph-options.js",
     "dygraph-layout.js",
     "dygraph-canvas.js",
     "dygraph.js",
diff --git a/dygraph-options.js b/dygraph-options.js
new file mode 100644 (file)
index 0000000..cc8c770
--- /dev/null
@@ -0,0 +1,143 @@
+/**
+ * @fileoverview DygraphOptions is responsible for parsing and returning information about options.
+ *
+ * Still tightly coupled to Dygraphs, we could remove some of that, you know.
+ */
+
+"use strict";
+
+/*
+ * Interesting member variables:
+ * dygraph_ - the graph.
+ * global - global attributes (common among all graphs, AIUI)
+ * user - attributes set by the user
+ * axes
+ * series - { seriesName -> { idx, yAxis, options }
+ * labels - used as mapping from index to series name.
+ */
+
+/**
+ * @constructor
+ *
+ * This parses attributes into an object that can be easily queried.
+ *
+ * @param {Dyraph} dygraph The chart to which these options belong.
+ */
+var DygraphOptions = function(dygraph) {
+  this.dygraph_ = dygraph;
+  this.axes_ = [];
+  this.series_ = {};
+
+  // Once these two objects are initialized, you can call find();
+  this.global_ = this.dygraph_.attrs_;
+  this.user_ = this.dygraph_.user_attrs_ || {};
+
+  this.highlightSeries_ = this.find("highlightSeriesOpts") || {};
+  // Get a list of series names.
+
+  var labels = this.find("labels");
+  if (!labels) {
+    return; // -- can't do more for now, will parse after getting the labels.
+  };
+
+  this.reparseSeries();
+}
+
+DygraphOptions.prototype.reparseSeries = function() {
+  this.labels = this.find("labels").slice(1);
+
+  this.axes_ = [ {} ]; // Always one axis at least.
+  this.series_ = {};
+
+  var axisId = 0; // 0-offset; there's always one.
+  // Go through once, add all the series, and for those with {} axis options, add a new axis.
+  for (var idx = 0; idx < this.labels.length; idx++) {
+    var seriesName = this.labels[idx];
+
+    var optionsForSeries = this.user_[seriesName] || {};
+    var yAxis = 0;
+
+    var axis = optionsForSeries["axis"];
+    if (typeof(axis) == 'object') {
+      yAxis = ++axisId;
+      this.axes_[yAxis] = axis;
+    }
+    this.series_[seriesName] = { idx: idx, yAxis: yAxis, options : optionsForSeries };
+  }
+
+  // Go through one more time and assign series to an axis defined by another
+  // series, e.g. { 'Y1: { axis: {} }, 'Y2': { axis: 'Y1' } }
+  for (var idx = 0; idx < this.labels.length; idx++) {
+    var seriesName = this.labels[idx];
+    var optionsForSeries = this.series_[seriesName]["options"]; 
+    var axis = optionsForSeries["axis"];
+
+    if (typeof(axis) == 'string') {
+      if (!this.series_.hasOwnProperty(axis)) {
+        this.dygraph_.error("Series " + seriesName + " wants to share a y-axis with " +
+                   "series " + axis + ", which does not define its own axis.");
+        return null;
+      }
+      this.series_[seriesName].yAxis = this.series_[axis].yAxis;
+    }
+  }
+
+  // This doesn't support reading from the 'x' axis, only 'y' and 'y2.
+  // Read from the global "axes" option.
+  if (this.user_.hasOwnProperty("axes")) {
+    var axis_opts = this.user_.axes;
+
+    if (axis_opts.hasOwnProperty("y")) {
+      Dygraph.update(this.axes_[0], axis_opts.y);
+    }
+
+    if (axis_opts.hasOwnProperty("y2")) {
+      this.axes_[1] = this.axes_[1] || {};
+      Dygraph.update(this.axes_[1], axis_opts.y2);
+    }
+  }
+};
+
+DygraphOptions.prototype.find = function(name) {
+  if (this.user_.hasOwnProperty(name)) {
+    return this.user_[name];
+  }
+  if (this.global_.hasOwnProperty(name)) {
+    return this.global_[name];
+  }
+  return null;
+}
+
+DygraphOptions.prototype.findForAxis = function(name, axis) {
+  var axisIdx = (axis == "y2" || axis == "y2" || axis == 1) ? 1 : 0;
+
+  var axisOptions = this.axes_[axisIdx];
+  if (axisOptions.hasOwnProperty(name)) {
+    return axisOptions[name];
+  }
+  return this.find(name);
+}
+
+DygraphOptions.prototype.findForSeries = function(name, series) {
+  // Honors indexes as series.
+  var seriesName = (typeof(series) == "number") ? this.labels[series] : series;
+
+  if (seriesName === this.dygraph_.highlightSet_) {
+    if (this.highlightSeries_.hasOwnProperty(name)) {
+      return this.highlightSeries_[name];
+    }
+  }
+
+  if (!this.series_.hasOwnProperty(seriesName)) {
+    throw "Unknown series: " + series;
+  }
+
+  var seriesObj = this.series_[seriesName];
+  var seriesOptions = seriesObj["options"];
+  if (seriesOptions.hasOwnProperty(name)) {
+    return seriesOptions[name];
+  }
+
+  return this.findForAxis(name, seriesObj["yAxis"]);
+}
+
index 9d58201..c7f7087 100644 (file)
@@ -437,6 +437,8 @@ Dygraph.prototype.__init__ = function(div, file, attrs) {
   this.registeredEvents_ = [];
   this.eventListeners_ = {};
 
+  this.attributes_ = new DygraphOptions(this);
+
   // Create the containing DIV and other interactive elements
   this.createInterface_();
 
@@ -568,6 +570,12 @@ Dygraph.prototype.attr_ = function(name, seriesName) {
   }
 // </REMOVE_FOR_COMBINED>
 
+  // Building an array which we peruse in backwards order to find the correct value.
+  // Options are checked in this order:
+  // series, axis, user attrs, global attrs.
+  // TODO(konigsberg): Can this be made faster by starting with the series and working outward,
+  // rather than building an array?
+
   var sources = [];
   sources.push(this.attrs_);
   if (this.user_attrs_) {
@@ -576,6 +584,8 @@ Dygraph.prototype.attr_ = function(name, seriesName) {
       if (this.user_attrs_.hasOwnProperty(seriesName)) {
         sources.push(this.user_attrs_[seriesName]);
       }
+
+      // TODO(konigsberg): This special case ought to be documented.
       if (seriesName === this.highlightSet_ &&
           this.user_attrs_.hasOwnProperty('highlightSeriesOpts')) {
         sources.push(this.user_attrs_.highlightSeriesOpts);
@@ -591,7 +601,14 @@ Dygraph.prototype.attr_ = function(name, seriesName) {
       break;
     }
   }
-  return ret;
+
+  var computedValue = seriesName ? this.attributes_.findForSeries(name, seriesName) : this.attributes_.find(name);
+  if (ret !== computedValue) {
+    console.log("Mismatch", name, seriesName, ret, computedValue);
+  }
+
+  var USE_NEW_VALUE = true;
+  return USE_NEW_VALUE ? computedValue : ret;
 };
 
 /**
@@ -1771,7 +1788,7 @@ Dygraph.prototype.mouseMove_ = function(event) {
 
   var highlightSeriesOpts = this.attr_("highlightSeriesOpts");
   var selectionChanged = false;
-  if (highlightSeriesOpts && !this.lockedSet_) {
+  if (highlightSeriesOpts && !this.isSeriesLocked()) {
     var closest;
     if (this.attr_("stackedGraph")) {
       closest = this.findStackedPoint(canvasx, canvasy);
@@ -2064,6 +2081,14 @@ Dygraph.prototype.getHighlightSeries = function() {
 };
 
 /**
+ * Returns true if the currently-highlighted series was locked
+ * via setSelection(..., seriesName, true).
+ */
+Dygraph.prototype.isSeriesLocked = function() {
+  return this.lockedSet_;
+};
+
+/**
  * Fires when there's data available to be graphed.
  * @param {String} data Raw CSV data to be plotted
  * @private
@@ -2179,7 +2204,8 @@ Dygraph.prototype.predraw_ = function() {
   // rolling averages.
   this.rolledSeries_ = [null];  // x-axis is the first series and it's special
   for (var i = 1; i < this.numColumns(); i++) {
-    var logScale = this.attr_('logscale', i); // TODO(klausw): this looks wrong
+    // var logScale = this.attr_('logscale', i); // TODO(klausw): this looks wrong // konigsberg thinks so too.
+    var logScale = this.attr_('logscale');
     var series = this.extractSeries_(this.rawData_, i, logScale);
     series = this.rollingAverage(series, this.rollPeriod_);
     this.rolledSeries_.push(series);
@@ -2952,6 +2978,7 @@ Dygraph.prototype.parseCSV_ = function(data) {
     // User hasn't explicitly set labels, so they're (presumably) in the CSV.
     start = 1;
     this.attrs_.labels = lines[0].split(delim);  // NOTE: _not_ user_attrs_.
+    this.attributes_.reparseSeries();
   }
   var line_no = 0;
 
@@ -3088,8 +3115,9 @@ Dygraph.prototype.parseArray_ = function(data) {
               "in the options parameter");
     this.attrs_.labels = [ "X" ];
     for (i = 1; i < data[0].length; i++) {
-      this.attrs_.labels.push("Y" + i);
+      this.attrs_.labels.push("Y" + i); // Not user_attrs_.
     }
+    this.attributes_.reparseSeries();
   } else {
     var num_labels = this.attr_("labels");
     if (num_labels.length != data[0].length) {
index 27a6458..2fdd1cf 100644 (file)
@@ -27,19 +27,6 @@ var getData = function(numSeries, numRows, isStacked) {
   return data;
 };
 
-var makeClickCallback = function(graph) {
-  var isLocked = false;
-  return function(ev) {
-    if (isLocked) {
-      graph.clearSelection();
-      isLocked = false;
-    } else {
-      graph.setSelection(graph.getSelection(), graph.getHighlightSeries(), true);
-      isLocked = true;
-    }
-  };
-};
-
 var makeGraph = function(className, numSeries, numRows, isStacked) {
   var demo = document.getElementById('demo');
   var div = document.createElement('div');
@@ -73,7 +60,14 @@ var makeGraph = function(className, numSeries, numRows, isStacked) {
           highlightCircleSize: 5,
         },
       });
-  g.updateOptions({clickCallback: makeClickCallback(g)}, true);
+  var onclick = function(ev) {
+    if (g.isSeriesLocked()) {
+      g.clearSelection();
+    } else {
+      g.setSelection(g.getSelection(), g.getHighlightSeries(), true);
+    }
+  };
+  g.updateOptions({clickCallback: onclick}, true);
   g.setSelection(false, 's005');
   //console.log(g);
 };
index 70a72e7..2ba5562 100644 (file)
@@ -438,65 +438,65 @@ return "" +
 function NoisyDataABC() {
 return "" +
 "Date,A,B,C\n" +
-"20061001,3.01953818828,0.7212041046,2.18487394958,0.599318549691,1.18487394958,0.599318549691\n" +
-"20061002,3.63321799308,0.778297234566,1.69491525424,0.531417655826,0.69491525424,0.531417655826\n" +
-"20061003,2.44328097731,0.644967734352,2.51256281407,0.640539070386,1.51256281407,0.640539070386\n" +
-"20061004,3.52733686067,0.774700921683,2.68456375839,0.66207105053,1.68456375839,0.66207105053\n" +
-"20061005,3.28719723183,0.741636245748,2.35294117647,0.621407707226,1.35294117647,0.621407707226\n" +
-"20061006,1.58450704225,0.523967868159,3.78657487091,0.791868460623,2.78657487091,0.791868460623\n" +
-"20061007,5.32859680284,0.946589405904,4.0404040404,0.807910739509,3.0404040404,0.807910739509\n" +
-"20061008,2.64084507042,0.672799548916,2.37288135593,0.626609885481,1.37288135593,0.626609885481\n" +
-"20061009,2.26480836237,0.620990945917,3.5413153457,0.75897176848,2.5413153457,0.75897176848\n" +
-"20061010,3.29289428076,0.74289969528,2.02702702703,0.579191340004,1.02702702703,0.579191340004\n" +
-"20061011,2.7633851468,0.681234043829,1.1744966443,0.4413034044,0.1744966443,0.4413034044\n" +
-"20061012,3.28719723183,0.741636245748,3.37268128162,0.741327769578,2.37268128162,0.741327769578\n" +
-"20061013,1.77304964539,0.55569466381,1.85810810811,0.555011329732,0.85810810811,0.555011329732\n" +
-"20061014,3.39892665474,0.7664008338,1.67224080268,0.524368852929,0.67224080268,0.524368852929\n" +
-"20061015,2.65017667845,0.675144574777,3.35570469799,0.737661045752,2.35570469799,0.737661045752\n" +
-"20061016,3.63951473137,0.779620631266,2.34899328859,0.620377617453,1.34899328859,0.620377617453\n" +
-"20061017,2.25694444444,0.618859623032,1.68067226891,0.526990133716,0.68067226891,0.526990133716\n" +
-"20061018,4.47504302926,0.857766274964,2.51677852349,0.641599927369,1.51677852349,0.641599927369\n" +
-"20061019,2.44755244755,0.646081155692,1.68067226891,0.526990133716,0.68067226891,0.526990133716\n" +
-"20061020,3.67775831874,0.787656442774,3.066439523,0.711598843969,2.066439523,0.711598843969\n" +
-"20061021,3.94265232975,0.823839169829,3.85906040268,0.788990618726,2.85906040268,0.788990618726\n" +
-"20061022,2.59067357513,0.660187558973,3.71621621622,0.777438794254,2.71621621622,0.777438794254\n" +
-"20061023,4.33275563258,0.847570482324,3.85906040268,0.788990618726,2.85906040268,0.788990618726\n" +
-"20061024,3.10344827586,0.720049610821,2.84280936455,0.679611549697,1.84280936455,0.679611549697\n" +
-"20061025,1.40350877193,0.492720767725,2.7027027027,0.666482380968,1.7027027027,0.666482380968\n" +
-"20061026,1.95035460993,0.582291234145,2.36486486486,0.624518599275,1.36486486486,0.624518599275\n" +
-"20061027,2.30905861456,0.632980642182,2.03045685279,0.580161203819,1.03045685279,0.580161203819\n" +
-"20061028,4.09252669039,0.835706590809,2.87648054146,0.68754192469,1.87648054146,0.68754192469\n" +
-"20061029,2.66903914591,0.679883997626,2.02360876897,0.578224712918,1.02360876897,0.578224712918\n" +
+"20061001,3.01953818828,0.7212041046,2.18487394958,0.599318549691,2.02013422819,0.701020603129\n" +
+"20061002,3.63321799308,0.778297234566,1.69491525424,0.531417655826,1.54237288136,0.648039583782\n" +
+"20061003,2.44328097731,0.644967734352,2.51256281407,0.640539070386,0.51006711409,0.499540743312\n" +
+"20061004,3.52733686067,0.774700921683,2.68456375839,0.66207105053,1.53378378378,0.645878720149\n" +
+"20061005,3.28719723183,0.741636245748,2.35294117647,0.621407707226,2.066439523,0.711598843969\n" +
+"20061006,1.58450704225,0.523967868159,3.78657487091,0.791868460623,1.01005025126,0.57439025002\n" +
+"20061007,5.32859680284,0.946589405904,4.0404040404,0.807910739509,1.6936026936,0.664269394219\n" +
+"20061008,2.64084507042,0.672799548916,2.37288135593,0.626609885481,1.5466893039,0.649125445325\n" +
+"20061009,2.26480836237,0.620990945917,3.5413153457,0.75897176848,1.01680672269,0.576301104352\n" +
+"20061010,3.29289428076,0.74289969528,2.02702702703,0.579191340004,1.6981450253,0.665374048085\n" +
+"20061011,2.7633851468,0.681234043829,1.1744966443,0.4413034044,0.85185185185,0.55316023504\n" +
+"20061012,3.28719723183,0.741636245748,3.37268128162,0.741327769578,0.69491525424,0.531417655826\n" +
+"20061013,1.77304964539,0.55569466381,1.85810810811,0.555011329732,1.19594594595,0.602321544724\n" +
+"20061014,3.39892665474,0.7664008338,1.67224080268,0.524368852929,0.843170320405,0.375484163785\n" +
+"20061015,2.65017667845,0.675144574777,3.35570469799,0.737661045752,1.22222222222,0.60944692682\n" +
+"20061016,3.63951473137,0.779620631266,2.34899328859,0.620377617453,1.20338983051,0.604340313133\n" +
+"20061017,2.25694444444,0.618859623032,1.68067226891,0.526990133716,3.05405405405,0.81058250986\n" +
+"20061018,4.47504302926,0.857766274964,2.51677852349,0.641599927369,2.0303030303,0.703344064467\n" +
+"20061019,2.44755244755,0.646081155692,1.68067226891,0.526990133716,2.71621621622,0.777438794254\n" +
+"20061020,3.67775831874,0.787656442774,3.066439523,0.711598843969,1.72572402044,0.672079879106\n" +
+"20061021,3.94265232975,0.823839169829,3.85906040268,0.788990618726,1.6981450253,0.665374048085\n" +
+"20061022,2.59067357513,0.660187558973,3.71621621622,0.777438794254,0.52027027027,0.502889967904\n" +
+"20061023,4.33275563258,0.847570482324,3.85906040268,0.788990618726,1.35294117647,0.621407707226\n" +
+"20061024,3.10344827586,0.720049610821,2.84280936455,0.679611549697,2.55329949239,0.761492892041\n" +
+"20061025,1.40350877193,0.492720767725,2.7027027027,0.666482380968,2.07692307692,0.713993047527\n" +
+"20061026,1.95035460993,0.582291234145,2.36486486486,0.624518599275,1.68907563025,0.663168401088\n" +
+"20061027,2.30905861456,0.632980642182,2.03045685279,0.580161203819,1.0202020202,0.57726130639\n" +
+"20061028,4.09252669039,0.835706590809,2.87648054146,0.68754192469,0.51260504202,0.500373860545\n" +
+"20061029,2.66903914591,0.679883997626,2.02360876897,0.578224712918,2.20945945946,0.724388507178\n" +
 "20061030,4.74516695958,0.89127787497,4.36241610738,0.836670992529,3.36241610738,0.836670992529\n" +
-"20061031,2.78260869565,0.685905251933,3.20945945946,0.724388507178,2.20945945946,0.724388507178\n" +
-"20061101,1.5873015873,0.524884521441,1.51260504202,0.500373860545,0.51260504202,0.500373860545\n" +
-"20061102,2.78745644599,0.687083077461,2.0202020202,0.57726130639,1.0202020202,0.57726130639\n" +
-"20061103,5.11463844797,0.925157232782,2.68907563025,0.663168401088,1.68907563025,0.663168401088\n" +
-"20061104,4.9001814882,0.919644816432,3.07692307692,0.713993047527,2.07692307692,0.713993047527\n" +
-"20061105,5.13274336283,0.928343545136,3.55329949239,0.761492892041,2.55329949239,0.761492892041\n" +
-"20061106,1.92644483363,0.575222935029,2.35294117647,0.621407707226,1.35294117647,0.621407707226\n" +
-"20061107,2.46478873239,0.650573541306,1.52027027027,0.502889967904,0.52027027027,0.502889967904\n" +
-"20061108,2.13523131673,0.609772022763,2.6981450253,0.665374048085,1.6981450253,0.665374048085\n" +
-"20061109,3.88007054674,0.811026422222,2.72572402044,0.672079879106,1.72572402044,0.672079879106\n" +
-"20061110,2.63620386643,0.671633132526,3.71621621622,0.777438794254,2.71621621622,0.777438794254\n" +
-"20061111,3.69718309859,0.791736755355,3.0303030303,0.703344064467,2.0303030303,0.703344064467\n" +
-"20061112,3.83944153578,0.802703592906,4.05405405405,0.81058250986,3.05405405405,0.81058250986\n" +
-"20061113,2.47787610619,0.653984033555,2.20338983051,0.604340313133,1.20338983051,0.604340313133\n" +
-"20061114,1.77304964539,0.55569466381,2.22222222222,0.60944692682,1.22222222222,0.60944692682\n" +
-"20061115,2.30088495575,0.630766388737,0.843170320405,0.375484163785,0.843170320405,0.375484163785\n" +
-"20061116,1.57894736842,0.522144132232,2.19594594595,0.602321544724,1.19594594595,0.602321544724\n" +
-"20061118,2.45183887916,0.647198426991,1.69491525424,0.531417655826,0.69491525424,0.531417655826\n" +
-"20061119,3.52733686067,0.774700921683,1.85185185185,0.55316023504,0.85185185185,0.55316023504\n" +
-"20061120,2.97723292469,0.711254751484,2.6981450253,0.665374048085,1.6981450253,0.665374048085\n" +
-"20061121,2.29681978799,0.629665059963,2.01680672269,0.576301104352,1.01680672269,0.576301104352\n" +
-"20061122,3.01418439716,0.719945245328,2.5466893039,0.649125445325,1.5466893039,0.649125445325\n" +
-"20061123,3.78378378378,0.809917534069,2.6936026936,0.664269394219,1.6936026936,0.664269394219\n" +
-"20061124,3.18584070796,0.738851643987,2.01005025126,0.57439025002,1.01005025126,0.57439025002\n" +
-"20061125,2.83185840708,0.697868332879,3.066439523,0.711598843969,2.066439523,0.711598843969\n" +
-"20061126,3.01953818828,0.7212041046,2.53378378378,0.645878720149,1.53378378378,0.645878720149\n" +
-"20061127,2.81195079086,0.693033387099,1.51006711409,0.499540743312,0.51006711409,0.499540743312\n" +
-"20061128,2.97723292469,0.711254751484,2.54237288136,0.648039583782,1.54237288136,0.648039583782\n" +
-"20061129,1.41093474427,0.495309102312,3.02013422819,0.701020603129,2.02013422819,0.701020603129\n";
+"20061031,2.78260869565,0.685905251933,3.20945945946,0.724388507178,1.02360876897,0.578224712918\n" +
+"20061101,1.5873015873,0.524884521441,1.51260504202,0.500373860545,1.87648054146,0.68754192469\n" +
+"20061102,2.78745644599,0.687083077461,2.0202020202,0.57726130639,1.03045685279,0.580161203819\n" +
+"20061103,5.11463844797,0.925157232782,2.68907563025,0.663168401088,1.36486486486,0.624518599275\n" +
+"20061104,4.9001814882,0.919644816432,3.07692307692,0.713993047527,1.7027027027,0.666482380968\n" +
+"20061105,5.13274336283,0.928343545136,3.55329949239,0.761492892041,1.84280936455,0.679611549697\n" +
+"20061106,1.92644483363,0.575222935029,2.35294117647,0.621407707226,2.85906040268,0.788990618726\n" +
+"20061107,2.46478873239,0.650573541306,1.52027027027,0.502889967904,2.71621621622,0.777438794254\n" +
+"20061108,2.13523131673,0.609772022763,2.6981450253,0.665374048085,2.85906040268,0.788990618726\n" +
+"20061109,3.88007054674,0.811026422222,2.72572402044,0.672079879106,2.066439523,0.711598843969\n" +
+"20061110,2.63620386643,0.671633132526,3.71621621622,0.777438794254,0.68067226891,0.526990133716\n" +
+"20061111,3.69718309859,0.791736755355,3.0303030303,0.703344064467,1.51677852349,0.641599927369\n" +
+"20061112,3.83944153578,0.802703592906,4.05405405405,0.81058250986,0.68067226891,0.526990133716\n" +
+"20061113,2.47787610619,0.653984033555,2.20338983051,0.604340313133,1.34899328859,0.620377617453\n" +
+"20061114,1.77304964539,0.55569466381,2.22222222222,0.60944692682,2.35570469799,0.737661045752\n" +
+"20061115,2.30088495575,0.630766388737,0.843170320405,0.375484163785,0.67224080268,0.524368852929\n" +
+"20061116,1.57894736842,0.522144132232,2.19594594595,0.602321544724,0.85810810811,0.555011329732\n" +
+"20061118,2.45183887916,0.647198426991,1.69491525424,0.531417655826,2.37268128162,0.741327769578\n" +
+"20061119,3.52733686067,0.774700921683,1.85185185185,0.55316023504,0.1744966443,0.4413034044\n" +
+"20061120,2.97723292469,0.711254751484,2.6981450253,0.665374048085,1.02702702703,0.579191340004\n" +
+"20061121,2.29681978799,0.629665059963,2.01680672269,0.576301104352,2.5413153457,0.75897176848\n" +
+"20061122,3.01418439716,0.719945245328,2.5466893039,0.649125445325,1.37288135593,0.626609885481\n" +
+"20061123,3.78378378378,0.809917534069,2.6936026936,0.664269394219,3.0404040404,0.807910739509\n" +
+"20061124,3.18584070796,0.738851643987,2.01005025126,0.57439025002,2.78657487091,0.791868460623\n" +
+"20061125,2.83185840708,0.697868332879,3.066439523,0.711598843969,1.35294117647,0.621407707226\n" +
+"20061126,3.01953818828,0.7212041046,2.53378378378,0.645878720149,1.68456375839,0.66207105053\n" +
+"20061127,2.81195079086,0.693033387099,1.51006711409,0.499540743312,1.51256281407,0.640539070386\n" +
+"20061128,2.97723292469,0.711254751484,2.54237288136,0.648039583782,0.69491525424,0.531417655826\n" +
+"20061129,1.41093474427,0.495309102312,3.02013422819,0.701020603129,1.18487394958,0.599318549691\n";
 }
 
 function data_showzerovalues() {