1

I am completely new to web development and thus this may sound extremely dumb but still. My aim is to plot a csv file located either on my server, or in a specific URL. The javascript library I discovered that can do this is dygraphs. What I am trying to do is just re-create the example they give at their site:

<html>
<head>
<script type="text/javascript"
  src="dygraph-combined-dev.js"></script>
</head>
<body>
<div id="graphdiv2"
  style="width:500px; height:300px;"></div>
<script type="text/javascript">
  g2 = new Dygraph(
    document.getElementById("graphdiv2"),
    "temperatures.csv", // path to CSV file
    {}          // options
  );
</script>
</body>
</html>

I put this snippet in the same folder as my csv files, and it doesnt work(my csv is named temperatures.csv). Is there any way I can actually do this. Again, I just want to have a nice plot on my website, representing my csv on the server or URL (no idea how)

Thanks

2 Answers 2

1

Change this line :

src="dygraph-combined-dev.js"></script>

to:

src="./dygraph-combined-dev.js"></script>

and make sure you have the file "dygraph-combined-dev.js" in the same folder as the html page you created.

Sign up to request clarification or add additional context in comments.

Comments

1

I figured out Firefox works perfectly, chrome doesn't. Thanks for the URL par tho.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.