cacatoo
Version:
Building, exploring, and sharing spatially structured models
549 lines (141 loc) • 6.59 kB
HTML
<html lang="en">
<head>
<meta charset="utf-8">
<title>JSDoc: Class: Graph</title>
<link rel="icon" type="image/png" href="images/favicon.png" />
<script src="scripts/prettify/prettify.js"> </script>
<script src="scripts/prettify/lang-css.js"> </script>
<script src="scripts/jquery.js"></script>
<script>
$(function(){
$("#Navigator").load("navigator.html");
});
</script>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
</head>
<body>
<div id="main">
<h1 class="page-title">Class: Graph</h1>
<section>
<header>
<h2><span class="attribs"><span class="type-signature"></span></span>Graph<span class="signature">(labels, values, colours, title, opts)</span><span class="type-signature"></span></h2>
<div class="class-description">Graph is a wrapper-class for a Dygraph element (see https://dygraphs.com/). It is attached to the DOM-windows, and stores all values to be plotted, colours, title, axis names, etc.</div>
</header>
<article>
<div class="container-overview">
<h2>Constructor</h2>
<h4 class="name" id="Graph"><span class="type-signature"></span>new Graph<span class="signature">(labels, values, colours, title, opts)</span><span class="type-signature"></span></h4>
<div class="description">
The constructor function for a @Canvas object.
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>labels</code></td>
<td class="type">
<span class="param-type">Array</span>
</td>
<td class="description last">array of strings containing the labels for datapoints (e.g. for the legend)</td>
</tr>
<tr>
<td class="name"><code>values</code></td>
<td class="type">
<span class="param-type">Array</span>
</td>
<td class="description last">Array of floats to plot (here plotted over time)</td>
</tr>
<tr>
<td class="name"><code>colours</code></td>
<td class="type">
<span class="param-type">Array</span>
</td>
<td class="description last">Array of colours to use for plotting</td>
</tr>
<tr>
<td class="name"><code>title</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last">Title of the plot</td>
</tr>
<tr>
<td class="name"><code>opts</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="description last">dictionary-style list of opts to pass onto dygraphs</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="cacatoo.js.html">cacatoo.js</a>, <a href="cacatoo.js.html#line27">line 27</a>
</li></ul></dd>
</dl>
</div>
<h3 class="subsection-title">Methods</h3>
<h4 class="name" id="push_data"><span class="type-signature"></span>push_data<span class="signature">(array)</span><span class="type-signature"></span></h4>
<div class="description">
Push data to your graph-element
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>array</code></td>
<td class="type">
<span class="param-type">array</span>
</td>
<td class="description last">of floats to be added to the dygraph object (stored in 'data')</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="cacatoo.js.html">cacatoo.js</a>, <a href="cacatoo.js.html#line82">line 82</a>
</li></ul></dd>
</dl>
<h4 class="name" id="update"><span class="type-signature"></span>update<span class="signature">()</span><span class="type-signature"></span></h4>
<div class="description">
Update the graph axes
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="cacatoo.js.html">cacatoo.js</a>, <a href="cacatoo.js.html#line90">line 90</a>
</li></ul></dd>
</dl>
</article>
</section>
</div>
<div id="Navigator"></div>
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.7</a> on Wed Jul 28 2021 15:33:33 GMT+0200 (Central European Summer Time)
</footer>
<script> prettyPrint(); </script>
<script src="scripts/linenumber.js"> </script>
</body>
</html>