couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Fred Smith <thefredsm...@gmail.com>
Subject How do I add an external JS library to CouchDB?
Date Mon, 29 Aug 2011 21:51:59 GMT
Hi,

I am trying to add the dygraph js library to CouchDB, so I can graph
data in a list function.
I have downloaded the library, but I don't know where it should go. When
I try create a 'new Dygraph' I get:
error":"render_error","reason":"function raised error: (new
ReferenceError(\"Dygraph is not defined\ ...."

I feel this is a dumb question, but how do I add an external JS library
to CouchDB?

Thanks for the help,
Fred

This is a sample from dygraph that won't work.

<html>
<head>
<script type="text/javascript"
  src="dygraph-combined.js"></script>
</head>
<body>
<div id="graphdiv"></div>
<script type="text/javascript">
  g = new Dygraph(

    // containing div
    document.getElementById("graphdiv"),

    // CSV or path to a CSV file.
    "Date,Temperature\n" +
    "2008-05-07,75\n" +
    "2008-05-08,70\n" +
    "2008-05-09,80\n"
  );
</script>
</body>
</html>


Mime
View raw message