title: dygraph: synchronization example
body: <p>I’m a bioengineer and I have to admit I have no experience with js. I’m using Dygraph to create a few graphs and I need to synchronize the zoom on them, so I check the example ‘synchronization’ in the gallery. It says I have to source extras/synchronizer.js on your page. When I click on it I end up in a page saying: 404 this is not the page you were looking for. </p>
  
  <p>Another problem, when I create a graph I get this error notifications:</p>
  
  <blockquote>
    <p>XMLHttpRequest cannot load
    file:///C:/xampp/htdocs/programs/progettoprovaG/averageV.csv. Cross
    origin requests are only supported for protocol schemes: http, data,
    chrome, chrome-extension, https, chrome-extension-resource.
    dygraph-combined-dev.js:5428 Uncaught NetworkError: Failed to execute
    'send' on 'XMLHttpRequest': Failed to load
    'file:///C:/xampp/htdocs/programs/progettoprovaG/averageV.csv'.</p>
  </blockquote>
  
  <p>By the way this is my code: </p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
      &lt;script src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.11.2.min.js"&gt;&lt;/script&gt;
      &lt;script type="text/javascript"
      src="dygraph-combined-dev.js"&gt;&lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;div id="div_average_breath_volume" style="width:600px; height:300px;"&gt;&lt;/div&gt;
      &lt;div id="div_average_breath_impedence" style="width:600px; height:300px;"&gt;&lt;/div&gt;
      &lt;script type="text/javascript"&gt;
      $(document).ready(function () {
          var highlight_start = 55;
          var highlight_end = 65;
  
          // grafico del volume + sd
          v = new Dygraph(
                  document.getElementById("div_average_breath_volume"),
          "averageV.csv",
          {
              labelsDivStyles: { 'textAlign': 'right' },
              labels: ["s","L"],
              errorBars: true,
              title: 'average breath', 
              ylabel: 'volume [L]',
              xlabel: 'time [s]',
              animatedZooms: true,
              underlayCallback: function(canvas, area, v) {
                  var bottom_left = v.toDomCoords(highlight_start);
                  var top_right = v.toDomCoords(highlight_end);
                  var left = bottom_left[0];
                  var right = top_right[0];
                  canvas.fillStyle = "rgba(255, 255, 102, 1.0)";
                  canvas.fillRect(left, area.y, right - left, area.h);
              }
          }
                  );
          z = new Dygraph(
                  document.getElementById("div_average_breath_impedence"),
          "averageZ.csv",
          {
              errorBars: true,
              labelsDivStyles: { 'textAlign': 'right' },
              legend: 'always',
              labels: ["s","R","X"],
              ylabel: 'impedence [L]',
              xlabel: 'time [s]',
              animatedZooms: true,
              underlayCallback: function(canvas, area, z) {
                  var bottom_left = z.toDomCoords(highlight_start);
                  var top_right = z.toDomCoords(highlight_end);
                  var left = bottom_left[0];
                  var right = top_right[0];
                  canvas.fillStyle = "rgba(255, 255, 102, 1.0)";
                  canvas.fillRect(left, area.y, right - left, area.h);
              }
          }
                  );     
      }
              );
          &lt;/script&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p></p>
  
  <p>Something similar happens when I try to simply execute an example from the Dygraph gallery:</p>
  
  <blockquote>
    <p>Failed to load resource: net::ERR_FILE_NOT_FOUND
    dygraph-combined-dev.js:5428 XMLHttpRequest cannot load
    file:///C:/xampp/htdocs/programs/progettoprovaG/twonormals.csv. Cross
    origin requests are only supported for protocol schemes: http, data,
    chrome, chrome-extension, https, chrome-extension-resource.
    dygraph-combined-dev.js:5428 Uncaught NetworkError: Failed to execute
    'send' on 'XMLHttpRequest': Failed to load
    'file:///C:/xampp/htdocs/programs/progettoprovaG/twonormals.csv'.</p>
  </blockquote>
  
  <p>Can anybody help me?</p>