-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMyRepotTest.txt
210 lines (180 loc) · 6.67 KB
/
MyRepotTest.txt
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Local HTML Report</title>
<link rel="stylesheet" href="css/bootstrap.css" type="text/css">
<link rel="stylesheet" href="css/bootstrap.min.css" type="text/css">
<link rel="stylesheet" href="css/bootstrap-theme.min.css" type="text/css">
<link rel="stylesheet" href="css/nv.d3.css" type="text/css">
<link rel="stylesheet" href="css/bootstrap-select.min.css" type="text/css">
<script src="js/jquery-3.2.1.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/bootstrap-select.min.js"></script>
<script src="js/d3.v3.js"></script>
<script src="js/nv.d3.js"></script>
<script src="js/d3.layout.cloud.js"></script>
</head>
<body><div class="container">
<H1 id="14">Youpi</H1>
<div class="dropdown" id="0">
<button class="btn btn-primary dropdown-toggle" type="button" data-toggle="dropdown">Super<span class="caret"></span></button>
<ul class="dropdown-menu">
<li><a href="#A">a</a></li>
<li><a href="#B">b</a></li>
</ul>
</div>
<select class="selectpicker" id="1">
<optgroup label="Node">
<option>GBC</option>
<option>BNPPAR</option>
</optgroup>
</select>
<div id="2">Olivier</div>
<div id="5" class="container-fluid">
<div class="row">
<div class="col-lg-6">
<ul class="list-group">
<li class="list-group-item">test<span class="badge">1</span></li>
<li class="list-group-item">Aurelie<span class="badge">12</span></li>
</ul>
</div>
<div class="col-lg-6">
<table class="table">
<thead><tr>
<th>Olivier</th>
<th>Aurelie</th>
<th>Youpi</th>
</tr></thead>
<tr>
<td>1</td>
<td>2</td>
<td>super</td>
</tr>
<tr>
<td>3</td>
<td>4</td>
<td>encore</td>
</tr>
</table>
</div>
</div>
</div>
<button id="6" type="button" class="btn btn-success">Youpi Test</button>
<input id="7" type="text" name="test" value="Encore">
<p id="9">Voici mon result <font id="8" class="font-weight-bold">YYYYYYYYYYYYYYYYYYYYYYYYYYYYYOUPI</font></p>
<div id="12" class="container-fluid">
<div class="row">
<div class="col-lg-6">
<div id="chart10" class="span4">
<svg width="960" height="500"></svg>
</div>
</div>
<div class="col-lg-6">
<div id="chart11" class="span4">
<svg width="960" height="500"></svg>
</div>
</div>
</div>
</div>
<div id="chart13" class="span4"></div>
<script>
$("#0 .dropdown-menu li").click(function(){
alert($(this).text()) ;
});
$("#1").change(function(){
alert($(this).val()) ;
});
$("#6").click(function(){
$("#8").html($("#7").val());
});
nv.addGraph(function() {
var fill = d3.scale.category20();
var data_10 = [{'size': 10, 'text': 'Super'}, {'size': 20, 'text': 'Olivier'}, {'size': 20, 'text': 'Aurelie'}] ;
d3.layout.cloud().size([960, 600])
.words(data_10) // Refer to the data variable
.rotate(function() { return ~~(Math.random() * 2) * 90; })
.font("Impact")
.fontSize(function(d) { return d.size; })
.on("end", draw)
.start()
;
function draw(words) {
d3.select("#chart10 svg") // Refer to the chart variable
.append("g")
.attr("transform", "translate(150,150)")
.selectAll("text")
.data(words)
.enter().append("text")
.style("font-size", function(d) { return d.size + "px"; })
.style("font-family", "Impact")
.style("fill", function(d, i) { return fill(i); })
.attr("text-anchor", "middle")
.attr("transform", function(d) { return "translate(" + [d.x, d.y] + ")rotate(" + d.rotate + ")"; })
.text(function(d) { return d.text; });
}
;
// words should be the javascript version of the data set expected by the graph
// Should be the select to the svg component
function drawCloudUpdate(words, jsGraphRef){
d3.layout.cloud().size([500, 500])
.words(words)
.padding(5)
.rotate(function() { return ~~(Math.random() * 2) * 90; })
.font("Impact")
.fontSize(function(d) { return d.size; })
.start();
jsGraphRef
.selectAll("g").attr("transform", "translate(150,150)")
.selectAll("text")
.data(words).enter().append("text")
.style("font-size", function(d) { return d.size + "px"; })
.style("font-family", "Impact")
.style("fill", function(d, i) { return fill(i); })
.attr("transform", function(d) { return "translate(" + [d.x, d.y] + ")rotate(" + d.rotate + ")"; })
.text(function(d) { return d.text; });
};
var chart_11 = nv.models.pieChart()
.x(function(d){ return d.label })
.y(function(d){ return d.value })
.showLabels(1)
.labelThreshold(.05)
.labelType("percent")
.donut(true)
.donutRatio(0.35);
var data_11 = [{'value': 29.765957771107, 'label': 'One'}, {'value': 32.807804682612, 'label': 'Two'}] ;
d3.select("#chart11 svg")
.datum(data_11).transition()
.duration(350)
.call(chart_11);
var chart_13 = nv.models.indentedTree()
.tableClass('table table-striped') //for bootstrap styling
.columns([
{
key: 'key',
label: 'Name',
showCount: true,
type: 'text',
classes: function(d) { return d.url ? 'clickable name' : 'name' },
click: function(d) {if (d.url) window.location.href = d.url; }
},
// Section dedicated to the columns definition
{
key: 'type',
label: 'Type',
width: '25%',
type: 'text'
}
]);
var data_13 = [{'values': [{'key': 'Charts', '_values': [{'key': 'Simple Line', 'url': 'http://novus.github.com/nvd3/ghpages/line.html', 'type': 'Historical'}]}], 'key': 'NVD3', 'url': 'http://novus.github.com/nvd3'}] ;
d3.select("#chart13")
.datum(data_13).transition()
.duration(350)
.call(chart_13);
});
</script>
</div>
</body>
</html>