00b508a0
luigser
DEEPCLIENT
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
<!DOCTYPE html>
<html>
<head>
<!-- style -->
<link rel="stylesheet" href="js/bootstrap-3.3.4-dist/css/bootstrap.css">
<!-- Js imports -->
<script type="text/javascript" src="js/jquery-1.11.2.min.js"></script>
<script type="text/javascript" src="../COMPONENTS/bower_components/webcomponentsjs/webcomponents.js"></script>
<script type="text/javascript" src="js/deepClient.js"></script>
<script src="js/bootstrap-3.3.4-dist/js/bootstrap.min.js"></script>
<script type="text/javascript">
//Bilancio preventivo regione Lazio
DATAURL = "http://dati.lazio.it/catalog/api/action/datastore_search?resource_id=722b6cbd-28d3-4151-ac50-9c4261298168&limit=1000";
FIELDS = Array("result,records,Capitolo","result,records,Previsione Competenza");
FIELDS1 = Array("result,records,Capitolo","result,records,Descr. capitolo","result,records,Previsione Competenza");
//Bilancio prato 2014
/*DATAURL = "http://ckan.routetopa.eu/api/action/datastore_search?resource_id=0cb600fc-19ad-4aaf-9794-1e6ea851840a&limit=1000";
FIELDS = Array("result,records,descrizione","result,records,movimento");
FIELDS1 = Array("result,records,titolo","result,records,categoria","result,records,descrizione","result,records,movimento");*/
|
be2bb3ab
isisadmin
test index refactory
|
23
24
25
|
//ROUTE-TO-PA CKAN DUBLIN
DATAURL1 = "http://ckan.routetopa.eu/api/action/datastore_search?resource_id=73e02092-85a1-434e-85fe-0c9a43aa9a52&limit=5000";
FIELDS2 = Array("result,records,Lat","result,records,Lng","result,records,Link");
|
00b508a0
luigser
DEEPCLIENT
|
26
|
|
be2bb3ab
isisadmin
test index refactory
|
27
28
29
|
//ROUTE-TO-PA CKAN TREEMAP
DATAURL2 = "http://ckan.routetopa.eu/api/action/datastore_search?resource_id=0cb600fc-19ad-4aaf-9794-1e6ea851840a&limit=10000";
FIELDS3 = Array("result,records,categoria","result,records,capitolo","result,records,movimento");
|
00b508a0
luigser
DEEPCLIENT
|
30
31
32
33
|
jQuery(document).ready(function($) {
var table_params ={
component : "datatable-datalet",
|
be2bb3ab
isisadmin
test index refactory
|
34
35
|
params :
{
|
00b508a0
luigser
DEEPCLIENT
|
36
37
38
39
40
41
42
|
'data-url' : DATAURL
},
fields : FIELDS1,
placeHolder : "table_component_place_holder"
};
var linechart_params ={
component : "linechart-datalet",
|
be2bb3ab
isisadmin
test index refactory
|
43
44
45
|
params :
{
'data-url' : DATAURL
|
00b508a0
luigser
DEEPCLIENT
|
46
47
48
49
50
51
|
},
fields : FIELDS,
placeHolder : "linechart_component_place_holder"
};
var barchart_params ={
component : "barchart-datalet",
|
be2bb3ab
isisadmin
test index refactory
|
52
53
54
|
params :
{
'data-url' : DATAURL
|
00b508a0
luigser
DEEPCLIENT
|
55
56
57
58
59
60
|
},
fields : FIELDS,
placeHolder : "barchart_component_place_holder"
};
var columnchart_params ={
component : "columnchart-datalet",
|
be2bb3ab
isisadmin
test index refactory
|
61
62
63
|
params :
{
'data-url' : DATAURL
|
00b508a0
luigser
DEEPCLIENT
|
64
65
66
67
|
},
fields : FIELDS,
placeHolder : "columnchart_component_place_holder"
};
|
be2bb3ab
isisadmin
test index refactory
|
68
69
|
var column3dchart_params ={
|
00b508a0
luigser
DEEPCLIENT
|
70
|
component : "column3Dchart-datalet",
|
be2bb3ab
isisadmin
test index refactory
|
71
72
73
|
params :
{
'data-url' : DATAURL1
|
00b508a0
luigser
DEEPCLIENT
|
74
|
},
|
be2bb3ab
isisadmin
test index refactory
|
75
|
fields : FIELDS2,
|
00b508a0
luigser
DEEPCLIENT
|
76
|
placeHolder : "column3dchart_component_place_holder"
|
be2bb3ab
isisadmin
test index refactory
|
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
|
};
var leafletjs_params ={
component : "leafletjs-datalet",
params :{
'data-url' : DATAURL1
},
fields : FIELDS2,
placeHolder : "leafletjs_component_place_holder"
};
var treemap_params = {
component : "treemap-datalet",
params :{
'data-url' : DATAURL2
},
fields : FIELDS3,
placeHolder : "treemap_component_place_holder"
};
ComponentService.deep_url = 'http://192.168.232.128/DEEalerProvider/DEEP/';
ComponentService.getComponent(table_params);
ComponentService.getComponent(linechart_params);
ComponentService.getComponent(barchart_params);
ComponentService.getComponent(columnchart_params);
ComponentService.getComponent(column3dchart_params);
ComponentService.getComponent(leafletjs_params);
ComponentService.getComponent(treemap_params);
|
00b508a0
luigser
DEEPCLIENT
|
107
|
|
00b508a0
luigser
DEEPCLIENT
|
108
109
110
111
112
113
114
115
|
});
</script>
</head>
<body>
<div class="jumbotron">
<div class="container">
<h2>Open Data Datalets</h2>
<p class="small text-info">In this page you can see several containers with opendata Datalets. To do this the page uses the DEEPCLIENT js library.
|
be2bb3ab
isisadmin
test index refactory
|
116
|
The only things you have to know is the data source url, the fields that component need to visualize the chart, the component you want to use and the place holder in witch the component will be
|
00b508a0
luigser
DEEPCLIENT
|
117
|
injected.
|
00b508a0
luigser
DEEPCLIENT
|
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
|
</div>
</div>
<div class="container">
<div class="row">
<div class="col-md-12">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title"> Datatable Datalet</h3>
</div>
<div class="panel-body">
<div id="table_component_place_holder"></div>
</div>
</div>
</div>
<div class="col-md-12">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">Linechart Datalet</h3>
</div>
<div class="panel-body">
<div id="linechart_component_place_holder"></div>
</div>
</div>
</div>
<div class="col-md-12">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">Barchart Datalet</h3>
</div>
<div class="panel-body">
<div id="barchart_component_place_holder"></div>
</div>
</div>
</div>
<div class="col-md-12">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">Columnchart Datalet</h3>
</div>
<div class="panel-body">
<div id="columnchart_component_place_holder"></div>
</div>
</div>
</div>
</div>
<div class="col-md-12">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">Column3Dchart Datalet</h3>
</div>
<div class="panel-body">
<div id="column3dchart_component_place_holder">
|
00b508a0
luigser
DEEPCLIENT
|
170
171
172
173
174
175
176
177
178
179
180
|
</div>
</div>
</div>
</div>
<div class="col-md-12">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">Leafletjs Map Datalet</h3>
</div>
<div class="panel-body">
<div id="leafletjs_component_place_holder">
|
00b508a0
luigser
DEEPCLIENT
|
181
182
183
184
185
186
187
188
|
</div>
</div>
</div>
</div>
<div class="col-md-12">
<div class="panel panel-default">
<div class="panel-heading">
|
be2bb3ab
isisadmin
test index refactory
|
189
|
<h3 class="panel-title">Treemap Datalet</h3>
|
00b508a0
luigser
DEEPCLIENT
|
190
191
192
|
</div>
<div class="panel-body">
<div id="treemap_component_place_holder">
|
00b508a0
luigser
DEEPCLIENT
|
193
194
195
196
197
198
199
200
201
|
</div>
</div>
</div>
</div>
</div>
</body>
</html>
|