PMSI-AlignAlytics / dimple

An object-oriented API for business analytics
Other
2.73k stars 556 forks source link

dimple is not defined #234

Open DestructionOfPlanetJupiter opened 8 years ago

DestructionOfPlanetJupiter commented 8 years ago

I try to run this example from the examples folder.

<!DOCTYPE html>
<meta charset="utf-8">
<html>
<div id="chartContainer">
  <script src="/lib/d3.v3.4.8.js"></script>
  <script src="/dist/dimple.v2.2.0.js"></script>
  <script type="text/javascript">
    var svg = dimple.newSvg("#chartContainer", 590, 400);
    d3.tsv("/data/example_data.tsv", function (data) {
      data = dimple.filterData(data, "Owner", ["Aperture", "Black Mesa"])
      var myChart = new dimple.chart(svg, data);
      myChart.setBounds(60, 30, 505, 305);
      var x = myChart.addCategoryAxis("x", "Month");
      x.addOrderRule("Date");
      myChart.addMeasureAxis("y", "Unit Sales");
      var s = myChart.addSeries(null, dimple.plot.line);
      myChart.draw();
    });
  </script>
</div>
</html>

ReferenceError: dimple is not defined

ventsyv commented 7 years ago

That happens when the dimple file is not properly included. That often happens if the src path is incorrect, or the js file was not properly deployed.