-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
56 lines (52 loc) · 1.82 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Demo</title>
<script src="../dist/stencil-components.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.9/angular.min.js"></script>
</head>
<body>
<div ng-app="sdiTriangleApp" ng-controller="sdiTriangleCtrl" >
<div ng-controller="sdiTriangleCtrl"></div>
<dashboard-element-container>
<ternary-graph></ternary-graph>
</dashboard-element-container>
</div>
<dashboard-element-container>
<ternary-graph></ternary-graph>
</dashboard-element-container>
<!-- Updating the first triangle via Angular -->
<style>
body {
margin: 0px;
padding: 0px;
font-family: sans-serif;
}
</style>
<script>
var app = angular.module("sdiTriangleApp", []);
app.controller("sdiTriangleCtrl", function($scope,$window) {
//The Array Must Follow This Order to create a proper SDI Triangle.
//Blue Green, Red, Name
$scope.recordArray =
[
{"A": 5, "B": 5, "C": 90,"X": 10,"Y": 10,"Z": 80, "Label": "Super Red"},
{"A": 0, "B": 0, "C": 100,"Label": "Uber Red"},
{"A": 90, "B": 5, "C": 5, "Label": "Super Blue"},
{"A": 100,"B": 0, "C": 0, "Label": "Uber Blue"},
{"A": 5, "B": 90, "C": 5, "Label": "Super Green"},
{"A": 0, "B": 100,"C": 0, "Label": "Uber Green"}
];
$scope.Corners = {"A": {"X":10,"Y": 10},"B": {"X":50,"Y": 80},"C":{"X":90,"Y":10}};
//This will currently only apply these to the first one it finds.
const ternarygraph = document.querySelector('ternary-graph');
ternarygraph.recordArray = $scope.recordArray;
ternarygraph.corners = $scope.Corners;
});
</script>
</body>
</html>
</html>