-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathshamy.graph.example.03.html
56 lines (51 loc) · 2.35 KB
/
shamy.graph.example.03.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>
<head>
<link rel="stylesheet" href="shamy.graph.css" type="text/css" />
<style type="text/css">
</style>
</head>
<body>
<div id="shamy-legend">
<b>Edge relationships color code:</b>
<span style="color:#FFFFFF;background-color:#000000;font-weight:bold;">A</span>ccountable,
<span style="color:#FFFFFF;background-color:#cc0000;font-weight:bold;">R</span>esponsible,
<span style="color:#FFFFFF;background-color:#e69138;font-weight:bold;">C</span>onsulted,
<span style="color:#FFFFFF;background-color:#f1c232;font-weight:bold;">I</span>nformed,
<span style="color:#FFFFFF;background-color:#38761d;font-weight:bold;">B</span>uddy/pal,
<span style="color:#FFFFFF;background-color:#0000ff;font-weight:bold;">D</span>ependency
</div>
<div id="shamy-graph"></div>
<div id="shamy-gss">
<iframe
width="2000"
height="400"
frameborder="0"
scrolling="no"
marginheight="0"
marginwidth="0"
src="https://docs.google.com/spreadsheets/d/1q0by2MmqwtmttEbbaZ_u-q5dCKrZDQnch2uiV_gA5BI/pubhtml?gid=1030514237&single=true&widget=true&headers=false">
</iframe>
</div>
<!-- JAVASCRIPTS -->
<script type="text/javascript" src="shamy.gss.js"></script>
<script type="text/javascript">
/** GSS data **/
var gssData = null;
function getData(json) { gssData = json.feed.entry; }
document.addEventListener("DOMContentLoaded", function(event) {
/** GSS RACI data rage coordinates **/
var raciDataLoc = {start:{col:4,row:4},end:{col:30,row: 106}};
/** Get shamyData **/
var shamyData = shamy.gss.getProcessedData(gssData,raciDataLoc);
//console.log(JSON.stringify(shamyData));
/** Display shamyData **/
var size = {"diameter":2000, "labelRadius":400};
shamy.graph.display(shamyData, "#shamy-graph", size);
});
</script>
<script src="https://spreadsheets.google.com/feeds/cells/1q0by2MmqwtmttEbbaZ_u-q5dCKrZDQnch2uiV_gA5BI/1/public/values?alt=json-in-script&callback=getData"></script>
<script type="text/javascript" src="d3.v3.min.js"></script>
<script type="text/javascript" src="shamy.graph.js"></script>
</body>
</html>