graph

by Stephen Lujan

HTML

<script src="http://dygraphs.com/dygraph-combined.js"></script>
<div id="wrapper">
    <!-- begin content area -->
    <div class="contentArea">
        <div id="graph" style="background-color: white;">loading graph...</div>
        <div class="inactive"> <b>Display: </b>

            <input type=checkbox id=0 onClick="toggleVisibility(this)" checked>
            <label for="0">Air Flow</label>
            <input type=checkbox id=1 onClick="toggleVisibility(this)" checked>
            <label for="1">Exhaust Ammonia</label>
            <input type=checkbox id=2 onClick="toggleVisibility(this)" checked>
            <label for="2">Exhaust Carbon Dioxide</label>
            <input type=checkbox id=3 onClick="toggleVisibility(this)" checked>
            <label for="3">Exhaust Relative Humidity</label>
            <input type=checkbox id=4 onClick="toggleVisibility(this)" checked>
            <label for="4">Exhaust Pressure</label>
            <input type=checkbox id=5 onClick="toggleVisibility(this)" checked>
            <label for="5">Exhaust Temperature</label>
            <input type=checkbox id=6 onClick="toggleVisibility(this)" checked>
            <label for="6">Supply Ammonia</label>
            <input type=checkbox id=7 onClick="toggleVisibility(this)" checked>
            <label for="7">Supply Carbon Dioxide</label>
            <input type=checkbox id=8 onClick="toggleVisibility(this)" checked>
            <label for="8">Supply Relative Humidity</label>
            <input type=checkbox id=9 onClick="toggleVisibility(this)" checked>
            <label for="9">Supply Pressure</label>
            <input type=checkbox id=10 onClick="toggleVisibility(this)" checked>
            <label for="10">Supply Temperature</label>
        </div>
    </div>
</div>

JavaScript

var graph = null;

$(document).ready(function () {
    var data = [
        [new Date(1371583060397), null, [6.48, 6.48, 6.00],
            [20.52, 20.52, 21.00],
            [20.00, 48.60, 60.00],
            [30.00, 31.32, 33.00],
            [72.00, 81.00, 85.00],
            [5.40, 5.40, 6.00],
            [19.44, 19.44, 21.00],
            [20.00, 43.20, 60.00],
            [31.00, 32.40, 34.00],
            [72.00, 75.60, 85.00]
        ],
        [new Date(1371583660397), null, [7.02, 7.02, 6.00],
            [22.23, 22.23, 21.00],
            [20.00, 52.65, 60.00],
            [30.00, 33.93, 33.00],
            [72.00, 87.75, 85.00],
            [5.85, 5.85, 6.00],
            [21.06, 21.06, 21.00],
            [20.00, 46.80, 60.00],
            [31.00, 35.10, 34.00],
            [72.00, 81.90, 85.00]
        ],
        [new Date(1371584260397), null, [6.60, 6.60, 6.00],
            [20.90, 20.90, 21.00],
            [20.00, 49.50, 60.00],
            [30.00, 31.90, 33.00],
            [72.00, 82.50, 85.00],
            [5.50, 5.50, 6.00],
            [19.80, 19.80, 21.00],
            [20.00, 44.00, 60.00],
            [31.00, 33.00, 34.00],
            [72.00, 77.00, 85.00]
        ],
        [new Date(1371584860397), null, [6.42, 6.42, 6.00],
            [20.33, 20.33, 21.00],
            [20.00, 48.15, 60.00],
            [30.00, 31.03, 33.00],
            [72.00, 80.25, 85.00],
            [5.35, 5.35, 6.00],
            [19.26, 19.26, 21.00],
            [20.00, 42.80, 60.00],
            [31.00, 32.10, 34.00],
            [72.00, 74.90, 85.00]
        ],
        [new Date(1371585460397), null, [6.90, 6.90, 6.00],
            [21.85, 21.85, 21.00],
            [20.00, 51.75, 60.00],
            [30.00, 33.35, 33.00],
            [72.00, 86.25, 85.00],
            [5.75, 5.75, 6.00],
            [20.70, 20.70, 21.00],
            [20.00, 46.00, 60.00],
            [31.00, 34.50, 34.00],
            [72.00, 80.50, 85.00]
        ],
        [new...