| 21627 |
kshitij.so |
1 |
<!doctype html>
|
|
|
2 |
<head>
|
|
|
3 |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
|
|
|
4 |
<script src="https://raw.github.com/DmitryBaranovskiy/raphael/300aa589f5a0ba7fce667cd62c7cdda0bd5ad904/raphael-min.js"></script>
|
|
|
5 |
<script src="../morris.js"></script>
|
|
|
6 |
<script src="lib/prettify.js"></script>
|
|
|
7 |
<script src="lib/example.js"></script>
|
|
|
8 |
<link rel="stylesheet" href="lib/example.css">
|
|
|
9 |
<link rel="stylesheet" href="lib/prettify.css">
|
|
|
10 |
<link rel="stylesheet" href="../morris.css">
|
|
|
11 |
</head>
|
|
|
12 |
<body>
|
|
|
13 |
<h1>Value Goals</h1>
|
|
|
14 |
<div id="graph"></div>
|
|
|
15 |
<pre id="code" class="prettyprint linenums">
|
|
|
16 |
var decimal_data = [];
|
|
|
17 |
for (var x = 0; x <= 360; x += 10) {
|
|
|
18 |
decimal_data.push({
|
|
|
19 |
x: x,
|
|
|
20 |
y: Math.sin(Math.PI * x / 180).toFixed(4)
|
|
|
21 |
});
|
|
|
22 |
}
|
|
|
23 |
window.m = Morris.Line({
|
|
|
24 |
element: 'graph',
|
|
|
25 |
data: decimal_data,
|
|
|
26 |
xkey: 'x',
|
|
|
27 |
ykeys: ['y'],
|
|
|
28 |
labels: ['sin(x)'],
|
|
|
29 |
parseTime: false,
|
|
|
30 |
goals: [-1, 0, 1]
|
|
|
31 |
});
|
|
|
32 |
</pre>
|
|
|
33 |
</body>
|