Commit 256ece27d45878825428ee3df1e2781bf871977d
1 parent
0242ec8c
new controllet
Showing
40 changed files
with
4321 additions
and
1141 deletions
alasql-utility/alasql-utility.js
| 1 | 1 | function alasql_QUERY (data, fields, filters, aggregators, orders) { |
| 2 | - if(fields.length == 0) | |
| 2 | + if(fields && fields.length == 0) | |
| 3 | 3 | return []; |
| 4 | 4 | |
| 5 | - var _fields = _addParenthesis(fields); | |
| 5 | + return alasql(alasql_QUERY_string(fields, filters, aggregators, orders), [data]); | |
| 6 | +} | |
| 7 | + | |
| 8 | +function alasql_QUERY_string (fields, filters, aggregators, orders) { | |
| 6 | 9 | |
| 7 | - var select = _alasql_SELECT(_fields); | |
| 10 | + if(fields) { | |
| 11 | + var _fields = _addParenthesis(fields); | |
| 12 | + var select = _alasql_SELECT(_fields); | |
| 13 | + } | |
| 8 | 14 | |
| 9 | 15 | var where = ""; |
| 10 | 16 | if(filters && filters.length) { |
| ... | ... | @@ -28,7 +34,7 @@ function alasql_QUERY (data, fields, filters, aggregators, orders) { |
| 28 | 34 | |
| 29 | 35 | var query = select + " FROM ?" + where + " " + groupBy + " " + orderBy; |
| 30 | 36 | |
| 31 | - return alasql(query, [data]); | |
| 37 | + return query; | |
| 32 | 38 | } |
| 33 | 39 | |
| 34 | 40 | function _alasql_SELECT (fields) { |
| ... | ... | @@ -44,16 +50,19 @@ function _alasql_SELECT (fields) { |
| 44 | 50 | } |
| 45 | 51 | |
| 46 | 52 | function _alasql_WHERE (filters) { |
| 47 | - var where = " WHERE "; | |
| 48 | - var logicalOperator; | |
| 53 | + //var logicalOperator; | |
| 54 | + // | |
| 55 | + ///*DEPRECATED*/if(filters[0].logicalOperator == undefined) { | |
| 56 | + // logicalOperator = "AND" | |
| 57 | + //} | |
| 58 | + //else { | |
| 59 | + // logicalOperator = filters[0].logicalOperator; | |
| 60 | + // filters = filters.slice(1); | |
| 61 | + //} | |
| 49 | 62 | |
| 50 | - /*DEPRECATED*/if(filters[0].logicalOperator == undefined) { | |
| 51 | - logicalOperator = "AND" | |
| 52 | - } | |
| 53 | - else { | |
| 54 | - logicalOperator = filters[0].logicalOperator; | |
| 55 | - filters = filters.slice(1); | |
| 56 | - } | |
| 63 | + var where = " WHERE "; | |
| 64 | + var logicalOperator = filters[0].logicalOperator; | |
| 65 | + filters = filters.slice(1); | |
| 57 | 66 | |
| 58 | 67 | for (var i=0; i < filters.length; i++) |
| 59 | 68 | filters[i]["field"] = _normalizeField(filters[i]["field"]); |
| ... | ... | @@ -87,7 +96,8 @@ function _alasql_GROUPBY (aggregators) { |
| 87 | 96 | groupBy += aggregators[i]["field"] + ", "; |
| 88 | 97 | } |
| 89 | 98 | else |
| 90 | - select += aggregators[i]["operation"] + "(" + aggregators[i]["field"] + ") as " + aggregators[i]["field"] + ", "; | |
| 99 | + //select += aggregators[i]["operation"] + "(" + aggregators[i]["field"] + ") as " + aggregators[i]["field"] + ", "; | |
| 100 | + select += aggregators[i]["operation"] + "(" + aggregators[i]["field"] + "), "; | |
| 91 | 101 | } |
| 92 | 102 | |
| 93 | 103 | return [select.slice(0, -2), groupBy.slice(0, -2)]; |
| ... | ... | @@ -118,7 +128,7 @@ function _normalizeField (field) { |
| 118 | 128 | return "[" + field + "]"; |
| 119 | 129 | } |
| 120 | 130 | |
| 121 | -function alasql_transformData (data, fields, truncate) { | |
| 131 | +function alasql_transformData (data, fields, round) { | |
| 122 | 132 | if(!data || data.length == 0) |
| 123 | 133 | return []; |
| 124 | 134 | |
| ... | ... | @@ -129,11 +139,11 @@ function alasql_transformData (data, fields, truncate) { |
| 129 | 139 | var field = fields[i]; |
| 130 | 140 | var values = []; |
| 131 | 141 | |
| 132 | - for (var i in data) { | |
| 133 | - var v = data[i][field]; | |
| 134 | - if(truncate) | |
| 142 | + for (var j in data) { | |
| 143 | + var v = data[j][field]; | |
| 144 | + if(round) | |
| 135 | 145 | if(!isNaN(v) && v % 1 != 0) |
| 136 | - v = Math.floor(v * 100) / 100; | |
| 146 | + v = Math.round(v * 1000000) / 1000000; | |
| 137 | 147 | values.push(v); |
| 138 | 148 | } |
| 139 | 149 | ... | ... |
controllets/aggregators-controllet/aggregators-controllet.html
0 โ 100755
| 1 | +<link rel="import" href="../../bower_components/polymer/polymer.html" /> | |
| 2 | + | |
| 3 | +<link rel="import" href="../../bower_components/paper-dropdown-menu/paper-dropdown-menu.html"> | |
| 4 | +<link rel="import" href="../../bower_components/paper-menu/paper-menu.html"> | |
| 5 | +<link rel="import" href="../../bower_components/paper-item/paper-item.html"> | |
| 6 | + | |
| 7 | +<link rel="import" href="../../bower_components/paper-icon-button/paper-icon-button.html"> | |
| 8 | +<link rel="import" href="../../bower_components/iron-icons/iron-icons.html"> | |
| 9 | +<link rel="import" href="../../bower_components/iron-icon/iron-icon.html"> | |
| 10 | + | |
| 11 | +<link rel="import" href="../../bower_components/paper-button/paper-button.html"> | |
| 12 | + | |
| 13 | +<dom-module id="aggregators-controllet"> | |
| 14 | + | |
| 15 | + <template> | |
| 16 | + | |
| 17 | + <style is="custom-style"> | |
| 18 | + | |
| 19 | + #aggregators_container { | |
| 20 | + height: 100%; | |
| 21 | + width: 100%; | |
| 22 | + position: relative; | |
| 23 | + } | |
| 24 | + | |
| 25 | + #aggregators_container * { | |
| 26 | + font-family: 'Roboto', 'Helvetica Neue', Helvetica, Arial, sans-serif; | |
| 27 | + font-size: 16px; | |
| 28 | + line-height: 24px; | |
| 29 | + } | |
| 30 | + | |
| 31 | + paper-dropdown-menu { | |
| 32 | + width: 100%; | |
| 33 | + --paper-input-container-focus-color: #2196F3; | |
| 34 | + } | |
| 35 | + | |
| 36 | + :host { | |
| 37 | + --paper-dropdown-menu-icon: { | |
| 38 | + color: #2196F3; | |
| 39 | + }; | |
| 40 | + } | |
| 41 | + | |
| 42 | + paper-item { | |
| 43 | + min-width: 128px; | |
| 44 | + white-space: nowrap; | |
| 45 | + } | |
| 46 | + | |
| 47 | + paper-item.iron-selected { | |
| 48 | + background-color: #2196F3; | |
| 49 | + color: #FFFFFF; | |
| 50 | + } | |
| 51 | + | |
| 52 | + paper-input { | |
| 53 | + width: 100%; | |
| 54 | + --paper-input-container-focus-color: #2196F3; | |
| 55 | + } | |
| 56 | + | |
| 57 | + paper-button { | |
| 58 | + position: absolute; | |
| 59 | + bottom: 0; | |
| 60 | + right: 0; | |
| 61 | + margin: 0 8px 8px 0; | |
| 62 | + height: 48px; | |
| 63 | + padding: 12px; | |
| 64 | + color: #FFFFFF; | |
| 65 | + background: #2196F3; | |
| 66 | + font-weight: 700; | |
| 67 | + | |
| 68 | + min-width: 216px; | |
| 69 | + } | |
| 70 | + | |
| 71 | + paper-button.disabled { | |
| 72 | + background-color: #B6B6B6; | |
| 73 | + } | |
| 74 | + | |
| 75 | + iron-icon[icon=group-work] { | |
| 76 | + height: 32px; | |
| 77 | + width: 32px; | |
| 78 | + color: #FFFFFF; | |
| 79 | + margin-top: -4px; | |
| 80 | + } | |
| 81 | + | |
| 82 | + paper-button:hover { | |
| 83 | + box-shadow: 0px 8px 12px #888; | |
| 84 | + -webkit-box-shadow: 0px 8px 12px #888; | |
| 85 | + -moz-box-shadow: 0px 8px 12px #888; | |
| 86 | + } | |
| 87 | + | |
| 88 | + paper-icon-button { | |
| 89 | + padding: 4px; | |
| 90 | + } | |
| 91 | + | |
| 92 | + paper-icon-button.add { | |
| 93 | + color: #2196F3; | |
| 94 | + --paper-icon-button-ink-color: #2196F3; | |
| 95 | + } | |
| 96 | + | |
| 97 | + paper-icon-button.cancel { | |
| 98 | + color: #F44336; | |
| 99 | + --paper-icon-button-ink-color: #F44336; | |
| 100 | + } | |
| 101 | + | |
| 102 | + #aggregators_container .row { | |
| 103 | + display: flex; | |
| 104 | + height: 60px; | |
| 105 | + width: 100%; | |
| 106 | + } | |
| 107 | + | |
| 108 | + #aggregators_container .ddl_container { | |
| 109 | + display: flex; | |
| 110 | + height: 60px; | |
| 111 | + width: 25%; | |
| 112 | + padding: 0px 8px; | |
| 113 | + } | |
| 114 | + | |
| 115 | + #aggregators_container .add_container { | |
| 116 | + height: 40px; | |
| 117 | + width: 40px; | |
| 118 | + padding: 10px 0px; | |
| 119 | + } | |
| 120 | + | |
| 121 | + #aggregators_container .row2 { | |
| 122 | + display: flex; | |
| 123 | + height: 48px; | |
| 124 | + width: 100%; | |
| 125 | + } | |
| 126 | + | |
| 127 | + #aggregators_container .row2 .highlighted { | |
| 128 | + color: #2196F3; | |
| 129 | + font-weight: 700; | |
| 130 | + } | |
| 131 | + | |
| 132 | + #aggregators_container .aggregator { | |
| 133 | + height: 24px; | |
| 134 | + width: calc(75% - 16px); | |
| 135 | + padding: 12px 8px; | |
| 136 | + } | |
| 137 | + | |
| 138 | + #aggregators_container .remove_container { | |
| 139 | + height: 40px; | |
| 140 | + width: 40px; | |
| 141 | + padding: 4px 8px; | |
| 142 | + } | |
| 143 | + | |
| 144 | + </style> | |
| 145 | + | |
| 146 | + <div id="aggregators_container"> | |
| 147 | + | |
| 148 | + <div class="row"> | |
| 149 | + <div class="ddl_container"> | |
| 150 | + <paper-dropdown-menu id="aggregator_groupby" label="GROUP BY"> | |
| 151 | + <paper-menu id="aggregator_groupby_menu" class="dropdown-content"> | |
| 152 | + <template is="dom-repeat" items={{selectedFields}}> | |
| 153 | + <paper-item id={{index}}>{{item}}</paper-item> | |
| 154 | + </template> | |
| 155 | + </paper-menu> | |
| 156 | + </paper-dropdown-menu> | |
| 157 | + </div> | |
| 158 | + | |
| 159 | + <div class="ddl_container"></div> | |
| 160 | + <div class="ddl_container"></div> | |
| 161 | + | |
| 162 | + <div class="ddl_container"> | |
| 163 | + <div class="add_container"> | |
| 164 | + <paper-icon-button on-click="_addGroupBy" icon="add-circle" class="add"></paper-icon-button> | |
| 165 | + </div> | |
| 166 | + </div> | |
| 167 | + </div> | |
| 168 | + | |
| 169 | + <div class="row"> | |
| 170 | + <div class="ddl_container"> | |
| 171 | + <paper-dropdown-menu id="aggregator_calculate" label="CALCULATE"> | |
| 172 | + <paper-menu id="aggregator_calculate_menu" class="dropdown-content"> | |
| 173 | + <template is="dom-repeat" items={{operations}}> | |
| 174 | + <paper-item id={{index}}>{{_getOperationlName(item)}}</paper-item> | |
| 175 | + </template> | |
| 176 | + </paper-menu> | |
| 177 | + </paper-dropdown-menu> | |
| 178 | + </div> | |
| 179 | + <div class="ddl_container"> | |
| 180 | + <paper-dropdown-menu id="aggregator_field" label="Field"> | |
| 181 | + <paper-menu id="aggregator_field_menu" class="dropdown-content"> | |
| 182 | + <template is="dom-repeat" items={{selectedFields}}> | |
| 183 | + <paper-item id={{index}}>{{item}}</paper-item> | |
| 184 | + </template> | |
| 185 | + </paper-menu> | |
| 186 | + </paper-dropdown-menu> | |
| 187 | + </div> | |
| 188 | + | |
| 189 | + <div class="ddl_container"></div> | |
| 190 | + | |
| 191 | + <div class="ddl_container"> | |
| 192 | + <div class="add_container"> | |
| 193 | + <paper-icon-button on-click="_addCalculate" icon="add-circle" class="add"></paper-icon-button> | |
| 194 | + </div> | |
| 195 | + </div> | |
| 196 | + </div> | |
| 197 | + | |
| 198 | + <template is="dom-repeat" items={{aggregators}}> | |
| 199 | + <div class="row2"> | |
| 200 | + <div class="aggregator"> | |
| 201 | + <span class="highlighted">{{_calculate(item.operation)}} {{_getOperationlName(item.operation)}}</span> {{item.field}} | |
| 202 | + </div> | |
| 203 | + <div class="remove_container"> | |
| 204 | + <paper-icon-button on-click="_deleteAggregator" icon="cancel" class="cancel"></paper-icon-button> | |
| 205 | + </div> | |
| 206 | + </div> | |
| 207 | + </template> | |
| 208 | + | |
| 209 | + <paper-button id="disable_aggregators" raised on-click="_disableAggregators"><iron-icon icon="group-work"></iron-icon> <span id="disable_enable"></span></paper-button> | |
| 210 | + | |
| 211 | + </div> | |
| 212 | + | |
| 213 | + </template> | |
| 214 | + | |
| 215 | + <script> | |
| 216 | + | |
| 217 | + Polymer({ | |
| 218 | + | |
| 219 | + is : 'aggregators-controllet', | |
| 220 | + | |
| 221 | + properties : { | |
| 222 | + | |
| 223 | + fields : { | |
| 224 | + type : Array, | |
| 225 | + value : [] | |
| 226 | + }, | |
| 227 | + | |
| 228 | + selectedFields : { | |
| 229 | + type : Array, | |
| 230 | + value : [] | |
| 231 | + }, | |
| 232 | + | |
| 233 | + operations : { | |
| 234 | + type : Array, | |
| 235 | + value : ["COUNT", "SUM", "MIN", "MAX", "AVG", "FIRST", "LAST"] | |
| 236 | + }, | |
| 237 | + | |
| 238 | + aggregators : { | |
| 239 | + type : Array, | |
| 240 | + value : [] | |
| 241 | + } | |
| 242 | + | |
| 243 | + }, | |
| 244 | + | |
| 245 | + ready : function() { | |
| 246 | + $(this.$.aggregators_container).perfectScrollbar(); | |
| 247 | + }, | |
| 248 | + | |
| 249 | + attached : function() { | |
| 250 | + this._translate(); | |
| 251 | + }, | |
| 252 | + | |
| 253 | + setFields : function(fields) { | |
| 254 | + this.fields = this._copy(fields); | |
| 255 | + }, | |
| 256 | + | |
| 257 | + setSelectedFields : function(selectedFields) { | |
| 258 | + this.selectedFields = this._copy(selectedFields); | |
| 259 | + }, | |
| 260 | + | |
| 261 | + setAggregators : function(aggregators) { | |
| 262 | + if(aggregators && aggregators.length > 0) { | |
| 263 | + this.aggregators = this._copy(aggregators); | |
| 264 | + this._fire(); | |
| 265 | + } | |
| 266 | + }, | |
| 267 | + | |
| 268 | + getAggregators : function() { | |
| 269 | + if(this.aggregators.length > 0 && this.aggregators[0].operation == "GROUP BY") | |
| 270 | + return this.aggregators; | |
| 271 | + return []; | |
| 272 | + }, | |
| 273 | + | |
| 274 | + reset : function() { | |
| 275 | + this.fields = []; | |
| 276 | + this.selectedFields = []; | |
| 277 | + this.aggregators = []; | |
| 278 | + }, | |
| 279 | + | |
| 280 | + _translate : function() { | |
| 281 | + this.$.aggregator_groupby.setAttribute("label", ln["GROUP BY_" + ln["localization"]]); | |
| 282 | + this.$.aggregator_calculate.setAttribute("label", ln["CALCULATE_" + ln["localization"]]); | |
| 283 | + this.$.aggregator_field.setAttribute("label", ln["aggregatorField_" + ln["localization"]]); | |
| 284 | + | |
| 285 | + this.$.disable_enable.innerHTML = ln["disableGroupBy_" + ln["localization"]]; | |
| 286 | + }, | |
| 287 | + | |
| 288 | + _calculate: function(operation) { | |
| 289 | + if(operation.indexOf("GROUP BY") > -1) | |
| 290 | + return ""; | |
| 291 | + return ln["Calculate_" + ln["localization"]] + " "; | |
| 292 | + }, | |
| 293 | + | |
| 294 | + _getOperationlName: function(operation) { | |
| 295 | + return ln[operation + "_" + ln["localization"]]; | |
| 296 | + }, | |
| 297 | + | |
| 298 | + _fire : function() { | |
| 299 | + this.$.disable_enable.innerHTML = ln["disableGroupBy_" + ln["localization"]]; | |
| 300 | + this.$.disable_aggregators.className = this.$.disable_aggregators.className.replace(" disabled", ""); | |
| 301 | + | |
| 302 | + if(this.aggregators.length > 0 && this.aggregators[0].operation == "GROUP BY") | |
| 303 | + this.fire('aggregators-controllet_aggregators', {aggregators: this.aggregators}); | |
| 304 | + else | |
| 305 | + this.fire('aggregators-controllet_aggregators', {aggregators: []}); | |
| 306 | + }, | |
| 307 | + | |
| 308 | + _addGroupBy : function() { | |
| 309 | + if (this.$.aggregator_groupby_menu.selectedItem) { | |
| 310 | + var field = this.$.aggregator_groupby.value; | |
| 311 | + | |
| 312 | + this.aggregators.unshift({"field": field, "operation": "GROUP BY"});//insert as last GB | |
| 313 | + | |
| 314 | + this.$.aggregator_groupby_menu.select(-1); | |
| 315 | + | |
| 316 | + this._fire(); | |
| 317 | + | |
| 318 | + this._renderAggregators(); | |
| 319 | + } | |
| 320 | + }, | |
| 321 | + | |
| 322 | + _addCalculate : function() { | |
| 323 | + if (this.$.aggregator_calculate_menu.selectedItem && this.$.aggregator_field.selectedItem) { | |
| 324 | + var field = this.$.aggregator_field.value; | |
| 325 | + var id = this.$.aggregator_calculate.selectedItem.id; | |
| 326 | + var operation = this.operations[id]; | |
| 327 | + | |
| 328 | + this.aggregators.push({"field": field, "operation": operation}); | |
| 329 | + | |
| 330 | + this.$.aggregator_field_menu.select(-1); | |
| 331 | + this.$.aggregator_calculate_menu.select(-1); | |
| 332 | + | |
| 333 | + this._fire(); | |
| 334 | + | |
| 335 | + this._renderAggregators(); | |
| 336 | + } | |
| 337 | + }, | |
| 338 | + | |
| 339 | + _deleteAggregator : function(e) { | |
| 340 | + var index = e.model.index; | |
| 341 | + | |
| 342 | + this.aggregators.splice(index, 1); | |
| 343 | + | |
| 344 | + this._fire(); | |
| 345 | + | |
| 346 | + this._renderAggregators(); | |
| 347 | + }, | |
| 348 | + | |
| 349 | +// _addAggregator : function() { | |
| 350 | +// if (this.$.aggregator_operation_menu.selectedItem && this.$.aggregator_field.selectedItem) { | |
| 351 | +// var field = this.$.aggregator_field.value; | |
| 352 | +// var id = this.$.aggregator_operation.selectedItem.id; | |
| 353 | +// var operation = this.operations[id]; | |
| 354 | +// | |
| 355 | +// this.aggregators.push({"field": field, "operation": operation}); | |
| 356 | +// | |
| 357 | +// this.$.aggregator_field_menu.select(-1); | |
| 358 | +// this.$.aggregator_operation_menu.select(-1); | |
| 359 | +// | |
| 360 | +// this._fire(); | |
| 361 | +// | |
| 362 | +// this._renderAggregators(); | |
| 363 | +// } | |
| 364 | +// }, | |
| 365 | +// | |
| 366 | +// _deleteAggregator : function(e) { | |
| 367 | +// var index = e.model.index; | |
| 368 | +// | |
| 369 | +// this.aggregators.splice(index, 1); | |
| 370 | +// | |
| 371 | +// this._fire(); | |
| 372 | +// | |
| 373 | +// this._renderAggregators(); | |
| 374 | +// }, | |
| 375 | + | |
| 376 | + _renderAggregators : function() { | |
| 377 | + var aggregators = this._copy(this.aggregators); | |
| 378 | + this.aggregators = []; | |
| 379 | + this.async(function() { | |
| 380 | + this.aggregators = aggregators; | |
| 381 | + }, 0); | |
| 382 | + }, | |
| 383 | + | |
| 384 | + _disableAggregators : function() { | |
| 385 | + var classes = this.$.disable_aggregators.className; | |
| 386 | + if (classes.indexOf("disabled") > -1) { | |
| 387 | + this._fire(); | |
| 388 | + } | |
| 389 | + else { | |
| 390 | + this.$.disable_enable.innerHTML = ln["enableGroupBy_" + ln["localization"]]; | |
| 391 | + this.$.disable_aggregators.className = classes + " disabled"; | |
| 392 | + this.fire('aggregators-controllet_aggregators', {aggregators: []}); | |
| 393 | + } | |
| 394 | + }, | |
| 395 | + | |
| 396 | + _copy : function(o) { | |
| 397 | + var out, v, key; | |
| 398 | + out = Array.isArray(o) ? [] : {}; | |
| 399 | + for (key in o) { | |
| 400 | + v = o[key]; | |
| 401 | + out[key] = (typeof v === "object") ? this._copy(v) : v; | |
| 402 | + } | |
| 403 | + return out; | |
| 404 | + } | |
| 405 | + | |
| 406 | + }); | |
| 407 | + | |
| 408 | + </script> | |
| 409 | + | |
| 410 | +</dom-module> | |
| 0 | 411 | \ No newline at end of file | ... | ... |
controllets/aggregators-controllet/demo/index.html
0 โ 100755
| 1 | +<html> | |
| 2 | + | |
| 3 | +<head> | |
| 4 | + <script src="../../shared_js/jquery-1.11.2.min.js"></script> | |
| 5 | + | |
| 6 | + <script src="../../../bower_components/webcomponentsjs/webcomponents-lite.min.js"></script> | |
| 7 | + | |
| 8 | + <link rel="import" href="../aggregators-controllet.html"/> | |
| 9 | + | |
| 10 | + <script src="../../../locales/controllet_ln.js"></script> | |
| 11 | + | |
| 12 | + <script src="../../shared_js/perfect-scrollbar/js/min/perfect-scrollbar.jquery.min.js"></script> | |
| 13 | + <link rel="stylesheet" href="../../shared_js/perfect-scrollbar/css/perfect-scrollbar.min.css"> | |
| 14 | +</head> | |
| 15 | + | |
| 16 | +<body> | |
| 17 | + | |
| 18 | + <style> | |
| 19 | + | |
| 20 | + .container { | |
| 21 | + height: 400px; | |
| 22 | + width: 1200px; | |
| 23 | + /*width: 400px;*/ | |
| 24 | + position: relative; | |
| 25 | + top: 100px; | |
| 26 | + left:300px; | |
| 27 | + } | |
| 28 | + | |
| 29 | + </style> | |
| 30 | + | |
| 31 | + <div class="container"> | |
| 32 | + <aggregators-controllet id="aggregators_controllet"></aggregators-controllet> | |
| 33 | + </div> | |
| 34 | + | |
| 35 | + <script> | |
| 36 | + ln["localization"] = "en"; | |
| 37 | + | |
| 38 | + var fields = ["aaa","bbb", "ccc", "ddd", "eee", "fff"]; | |
| 39 | + var selectedFields = ["ccc","aaa", "eee"]; | |
| 40 | + | |
| 41 | +// var aggregators_controllet = document.getElementById('aggregators_controllet'); | |
| 42 | + | |
| 43 | + aggregators_controllet.setFields(fields); | |
| 44 | + aggregators_controllet.setSelectedFields(selectedFields); | |
| 45 | + | |
| 46 | +// aggregators_controllet.aggregators = [{logicalOperator: "OR"}, {field: "Lat", operation: "<=", value: "16"}, {field: "Long", operation: "!=", value: "32"}, {field: "Sbiricos", operation: "!=", value: "12AAA32+DAO"}]; | |
| 47 | +// filters_controllet.logicalOperator = "or"; | |
| 48 | + | |
| 49 | +// var filters = filters_controllet.getFilters(); | |
| 50 | +// | |
| 51 | +// console.log(filters); | |
| 52 | + | |
| 53 | + </script> | |
| 54 | + | |
| 55 | +</body> | |
| 56 | + | |
| 57 | +</html> | |
| 0 | 58 | \ No newline at end of file | ... | ... |
controllets/data-sevc-controllet/co-datalets-creator-controllet.html
| ... | ... | @@ -41,7 +41,8 @@ |
| 41 | 41 | listeners : { |
| 42 | 42 | 'page-slider-controllet_selected' : '_updateSlider', |
| 43 | 43 | 'select-fields-controllet_selected-fields' : '_allowThirdStep', |
| 44 | - 'filters-controllet_filters': '_allowThirdStep' | |
| 44 | + 'filters-controllet_filters': '_allowThirdStep', | |
| 45 | + 'aggregators-controllet_aggregators': '_allowThirdStep' | |
| 45 | 46 | }, |
| 46 | 47 | |
| 47 | 48 | properties : { |
| ... | ... | @@ -104,13 +105,15 @@ |
| 104 | 105 | |
| 105 | 106 | _allowThirdStep : function(){ |
| 106 | 107 | this.$.slider.chevronRight(false); |
| 107 | - var fields = this.$.select_data.getSelectedFields(); | |
| 108 | + var selectedFields = this.$.select_data.getSelectedFields(); | |
| 108 | 109 | var filters = this.$.select_data.getFilters(); |
| 110 | + var aggregators = this.$.select_data.getAggregators(); | |
| 109 | 111 | var data = this.$.select_data.getData(); |
| 110 | - if(fields.length > 0) { | |
| 112 | + if(selectedFields.length > 0) { | |
| 111 | 113 | this.$.select_visualization.init(); |
| 112 | - this.$.select_visualization.setFields(fields); | |
| 114 | + this.$.select_visualization.setSelectedFields(selectedFields); | |
| 113 | 115 | this.$.select_visualization.setFilters(filters); |
| 116 | + this.$.select_visualization.setAggregators(aggregators); | |
| 114 | 117 | this.$.select_visualization.setData(data); |
| 115 | 118 | this.$.slider.chevronRight(true); |
| 116 | 119 | } | ... | ... |
controllets/data-sevc-controllet/data-sevc-controllet.html
| ... | ... | @@ -50,6 +50,7 @@ |
| 50 | 50 | 'dataset-selection-controllet_data-url' : '_allowSecondStep', |
| 51 | 51 | 'select-fields-controllet_selected-fields' : '_allowThirdStep', |
| 52 | 52 | 'filters-controllet_filters': '_allowThirdStep', |
| 53 | + 'aggregators-controllet_aggregators': '_allowThirdStep', | |
| 53 | 54 | 'data-ready': '_dataReady' |
| 54 | 55 | }, |
| 55 | 56 | |
| ... | ... | @@ -138,13 +139,15 @@ |
| 138 | 139 | |
| 139 | 140 | _allowThirdStep : function(){ |
| 140 | 141 | this.$.slider.chevronRight(false); |
| 141 | - var fields = this.$.select_data.getSelectedFields(); | |
| 142 | + var selectedFields = this.$.select_data.getSelectedFields(); | |
| 142 | 143 | var filters = this.$.select_data.getFilters(); |
| 144 | + var aggregators = this.$.select_data.getAggregators(); | |
| 143 | 145 | var data = this.$.select_data.getData(); |
| 144 | - if(fields.length > 0) { | |
| 146 | + if(selectedFields.length > 0) { | |
| 145 | 147 | this.$.select_visualization.init(); |
| 146 | - this.$.select_visualization.setFields(fields); | |
| 148 | + this.$.select_visualization.setSelectedFields(selectedFields); | |
| 147 | 149 | this.$.select_visualization.setFilters(filters); |
| 150 | + this.$.select_visualization.setAggregators(aggregators); | |
| 148 | 151 | this.$.select_visualization.setData(data); |
| 149 | 152 | this.$.slider.chevronRight(true); |
| 150 | 153 | } | ... | ... |
controllets/datalet-preview-controllet/datalet-preview-controllet.html
0 โ 100644
| 1 | +<link rel="import" href="../../bower_components/polymer/polymer.html" /> | |
| 2 | + | |
| 3 | +<link rel="import" href="../../bower_components/paper-material/paper-material.html" /> | |
| 4 | + | |
| 5 | +<link rel="import" href="../../bower_components/paper-tabs/paper-tabs.html"> | |
| 6 | +<link rel="import" href="../../bower_components/paper-tabs/paper-tab.html"> | |
| 7 | + | |
| 8 | +<link rel="import" href="../../bower_components/neon-animation/neon-animation.html"> | |
| 9 | +<link rel="import" href="../../bower_components/neon-animation/neon-animatable.html"> | |
| 10 | +<link rel="import" href="../../bower_components/neon-animation/neon-animations.html"> | |
| 11 | + | |
| 12 | +<dom-module id="datalet-preview-controllet"> | |
| 13 | + | |
| 14 | + <template> | |
| 15 | + | |
| 16 | + <style is="custom-style"> | |
| 17 | + #preview_container { | |
| 18 | + height: 100%; | |
| 19 | + width: 100%; | |
| 20 | + } | |
| 21 | + | |
| 22 | + #preview_container * { | |
| 23 | + font-family: 'Roboto', 'Helvetica Neue', Helvetica, Arial, sans-serif; | |
| 24 | + font-size: 16px; | |
| 25 | + line-height: 24px; | |
| 26 | + } | |
| 27 | + | |
| 28 | + #preview_container #neon_container { | |
| 29 | + height: calc(100% - 48px); | |
| 30 | + width: 100%; | |
| 31 | + } | |
| 32 | + | |
| 33 | + #preview_container #preview, #preview_container #info { | |
| 34 | + position: relative; | |
| 35 | + height: calc(100% - 32px); | |
| 36 | + width: calc(100% - 32px); | |
| 37 | + padding: 16px; | |
| 38 | + } | |
| 39 | + | |
| 40 | + #preview_container #info_container { | |
| 41 | + display: flex; | |
| 42 | + flex-direction: row; | |
| 43 | + } | |
| 44 | + | |
| 45 | + #preview_container #datalet_img{ | |
| 46 | + min-height: 124px; | |
| 47 | + width: 124px; | |
| 48 | + position:relative; | |
| 49 | + } | |
| 50 | + | |
| 51 | + #preview_container img{ | |
| 52 | + max-width: 124px; | |
| 53 | + position: absolute; | |
| 54 | + top: 0; | |
| 55 | + bottom: 0; | |
| 56 | + margin: auto; | |
| 57 | + } | |
| 58 | + | |
| 59 | + #preview_container #datalet_base_info { | |
| 60 | + width: calc(100% - 124px - 16px); | |
| 61 | + margin-left: 16px; | |
| 62 | + } | |
| 63 | + | |
| 64 | + #preview_container #datalet_name{ | |
| 65 | + font-size: 32px; | |
| 66 | + line-height: 48px; | |
| 67 | + color: #2196F3; | |
| 68 | + } | |
| 69 | + | |
| 70 | + #preview_container #datalet_description{ | |
| 71 | + } | |
| 72 | + | |
| 73 | + #preview_container #datalet_inputs{ | |
| 74 | + margin-top: 16px; | |
| 75 | + } | |
| 76 | + | |
| 77 | + #preview_container .input_label { | |
| 78 | + color: #2196F3; | |
| 79 | + font-weight: 700; | |
| 80 | + } | |
| 81 | + | |
| 82 | + #preview_container ul { | |
| 83 | + list-style-type: disc; | |
| 84 | + } | |
| 85 | + | |
| 86 | + #preview_container li { | |
| 87 | + font-weight: 700; | |
| 88 | + } | |
| 89 | + | |
| 90 | + paper-tabs { | |
| 91 | + background: #B6B6B6; | |
| 92 | + --paper-tabs-selection-bar-color: #2196F3; | |
| 93 | + } | |
| 94 | + | |
| 95 | + paper-tab { | |
| 96 | + --paper-tab-ink: #2196F3; | |
| 97 | + } | |
| 98 | + | |
| 99 | + paper-tab.iron-selected { | |
| 100 | + font-weight: 700; | |
| 101 | + } | |
| 102 | + | |
| 103 | + paper-tab:hover { | |
| 104 | + color: #2196F3; | |
| 105 | + } | |
| 106 | + | |
| 107 | + </style> | |
| 108 | + | |
| 109 | + <paper-material id="preview_container" elevation="5"> | |
| 110 | + | |
| 111 | + <paper-tabs selected="{{tabIndex}}"> | |
| 112 | + <paper-tab><span id="previewTab"></span></paper-tab> | |
| 113 | + <paper-tab><span id="infoTab"></span></paper-tab> | |
| 114 | + </paper-tabs> | |
| 115 | + | |
| 116 | + <neon-animated-pages id="neon_container" selected="{{_getNeonIndex(tabIndex)}}" entry-animation="fade-in-animation" exit-animation="fade-out-animation"> | |
| 117 | + | |
| 118 | + <neon-animatable> | |
| 119 | + <div id="preview"> | |
| 120 | + | |
| 121 | + </div> | |
| 122 | + </neon-animatable> | |
| 123 | + | |
| 124 | + <neon-animatable> | |
| 125 | + <div id="info"> | |
| 126 | + <div id="info_container"> | |
| 127 | + <div id="datalet_img"> | |
| 128 | + <img src="{{dataletImg}}"> | |
| 129 | + </div> | |
| 130 | + <div id="datalet_base_info"> | |
| 131 | + <div id="datalet_name"> | |
| 132 | + {{dataletName}} | |
| 133 | + </div> | |
| 134 | + <div id="datalet_description"> | |
| 135 | + {{dataletDescription}} | |
| 136 | + </div> | |
| 137 | + </div> | |
| 138 | + </div> | |
| 139 | + <div id="datalet_inputs"> | |
| 140 | + <span id="inputs" class="input_label"></span> | |
| 141 | + <ul> | |
| 142 | + <template is="dom-repeat" items="{{inputs}}"> | |
| 143 | + <li>{{_getInputName(item.name)}}</li> | |
| 144 | + {{_getInputDescription(item.name)}} | |
| 145 | + </template> | |
| 146 | + </ul> | |
| 147 | + <span id="options" class="input_label"></span> | |
| 148 | + <ul> | |
| 149 | + <template is="dom-repeat" items="{{options}}"> | |
| 150 | + <li>{{_getInputName(item.name)}}</li> | |
| 151 | + {{_getInputDescription(item.name)}} | |
| 152 | + </template> | |
| 153 | + </ul> | |
| 154 | + </div> | |
| 155 | + </div> | |
| 156 | + </neon-animatable> | |
| 157 | + | |
| 158 | + </neon-animated-pages> | |
| 159 | + | |
| 160 | + </paper-material> | |
| 161 | + | |
| 162 | + </template> | |
| 163 | + | |
| 164 | + <script> | |
| 165 | + | |
| 166 | + Polymer({ | |
| 167 | + | |
| 168 | + is : 'datalet-preview-controllet', | |
| 169 | + | |
| 170 | + properties : { | |
| 171 | + | |
| 172 | + deepUrl : { | |
| 173 | + type : String, | |
| 174 | + value : undefined | |
| 175 | + }, | |
| 176 | + | |
| 177 | + tabIndex: { | |
| 178 | + type: Number, | |
| 179 | + value: 0 | |
| 180 | + } | |
| 181 | + | |
| 182 | + }, | |
| 183 | + | |
| 184 | + ready : function() { | |
| 185 | + $(this.$.preview).perfectScrollbar(); | |
| 186 | + $(this.$.info).perfectScrollbar(); | |
| 187 | + }, | |
| 188 | + | |
| 189 | + attached : function() { | |
| 190 | + this._translate(); | |
| 191 | + }, | |
| 192 | + | |
| 193 | + _translate : function(){ | |
| 194 | + this.$.previewTab.innerHTML = ln["previewTab_" + ln["localization"]]; | |
| 195 | + this.$.infoTab.innerHTML = ln["infoTab_" + ln["localization"]]; | |
| 196 | + }, | |
| 197 | + | |
| 198 | + loadDatalet : function(dataletParams){ | |
| 199 | + this._setTabindex(0); | |
| 200 | + | |
| 201 | + dataletParams.placeHolder = this.$.preview; | |
| 202 | + | |
| 203 | + ComponentService.deep_url = this.deepUrl; | |
| 204 | + ComponentService.getComponent(dataletParams); | |
| 205 | + }, | |
| 206 | + | |
| 207 | + eraseDatalet : function(){ | |
| 208 | + this.$.preview.innerHTML = ""; | |
| 209 | + }, | |
| 210 | + | |
| 211 | + loadInfo : function(selectedDatalet){ | |
| 212 | + this._setTabindex(1); | |
| 213 | + | |
| 214 | + this.dataletImg = (selectedDatalet.bridge_link + selectedDatalet.component_link).replace("html", "png"); | |
| 215 | + this.dataletName = this._getChartName(selectedDatalet.name.replace("-datalet", "")); | |
| 216 | + this.dataletDescription = this._getChartName(selectedDatalet.name.replace("-datalet", "Description")); | |
| 217 | + | |
| 218 | + var inputs = selectedDatalet.idm.inputs.input; | |
| 219 | + var options = []; | |
| 220 | + if(selectedDatalet.idm.inputs.layouts) | |
| 221 | + options = selectedDatalet.idm.inputs.layouts.input; | |
| 222 | + | |
| 223 | + if(!(inputs instanceof Array)) | |
| 224 | + inputs = [inputs]; | |
| 225 | + | |
| 226 | + if(!(options instanceof Array)) | |
| 227 | + options = [options]; | |
| 228 | + | |
| 229 | + this.inputs = inputs; | |
| 230 | + this.options = options; | |
| 231 | + | |
| 232 | + this.$.inputs.innerHTML = ln["inputs_" + ln["localization"]]; | |
| 233 | + if(this.options.length > 0) | |
| 234 | + this.$.options.innerHTML = ln["options_" + ln["localization"]]; | |
| 235 | + else | |
| 236 | + this.$.options.innerHTML = ""; | |
| 237 | + }, | |
| 238 | + | |
| 239 | + eraseInfo : function(){ | |
| 240 | + this.dataletImg = ""; | |
| 241 | + this.dataletName = ""; | |
| 242 | + this.dataletDescription = ""; | |
| 243 | + | |
| 244 | + this.inputs = []; | |
| 245 | + this.options = []; | |
| 246 | + | |
| 247 | + this.$.inputs.innerHTML = ""; | |
| 248 | + this.$.options.innerHTML = ""; | |
| 249 | + }, | |
| 250 | + | |
| 251 | + _getChartName: function(key) { | |
| 252 | + return ln[key + "_" +ln["localization"]]; | |
| 253 | + }, | |
| 254 | + | |
| 255 | +// _getInputRichName : function(item) { | |
| 256 | +// var name = ln[item.name + "_" +ln["localization"]]; | |
| 257 | +// if(item.type != "TEXT") | |
| 258 | +// name += " [" + item.type + "]"; | |
| 259 | +// if(item.selection == "?") | |
| 260 | +// name += " [OPT]"; | |
| 261 | +// return name; | |
| 262 | +// }, | |
| 263 | + | |
| 264 | + _getInputName : function(name) { | |
| 265 | + return ln[name + "_" +ln["localization"]]; | |
| 266 | + }, | |
| 267 | + | |
| 268 | + _getInputDescription : function(name) { | |
| 269 | + return ln[name + "Description_" +ln["localization"]]; | |
| 270 | + }, | |
| 271 | + | |
| 272 | + _setTabindex : function(tabIndex) { | |
| 273 | + this.debounce('_filter', function () { | |
| 274 | + this.tabIndex = -1; | |
| 275 | + this.tabIndex = tabIndex; | |
| 276 | + }, 0); | |
| 277 | + }, | |
| 278 | + | |
| 279 | + _getNeonIndex : function(tabIndex){ | |
| 280 | + if(tabIndex == -1) | |
| 281 | + return 0; | |
| 282 | + return tabIndex; | |
| 283 | + } | |
| 284 | + | |
| 285 | + }); | |
| 286 | + | |
| 287 | + </script> | |
| 288 | + | |
| 289 | +</dom-module> | |
| 0 | 290 | \ No newline at end of file | ... | ... |
controllets/datalet-preview-controllet/index/index.html
0 โ 100644
controllets/datalets-modifier-controllet/datalets-modifier-controllet.html
| ... | ... | @@ -42,6 +42,7 @@ |
| 42 | 42 | 'page-slider-controllet_selected' : '_updateSlider', |
| 43 | 43 | 'select-fields-controllet_selected-fields' : '_allowThirdStep', |
| 44 | 44 | 'filters-controllet_filters': '_allowThirdStep', |
| 45 | + 'aggregators-controllet_aggregators': '_allowThirdStep', | |
| 45 | 46 | 'data-ready': '_preselect' |
| 46 | 47 | }, |
| 47 | 48 | |
| ... | ... | @@ -96,6 +97,8 @@ |
| 96 | 97 | _preselect : function(){ |
| 97 | 98 | this.$.select_data.setSelectedFields(this.selectedFields); |
| 98 | 99 | this.$.select_data.setFilters(JSON.parse(this.dataletPreset["filters"])); |
| 100 | + this.$.select_data.setAggregators(JSON.parse(this.dataletPreset["aggregators"])); | |
| 101 | +// this.$.select_visualization.preselect(); | |
| 99 | 102 | }, |
| 100 | 103 | |
| 101 | 104 | _updateSlider : function(e){ |
| ... | ... | @@ -114,23 +117,27 @@ |
| 114 | 117 | |
| 115 | 118 | this.$.slider.chevronLeft(true); |
| 116 | 119 | this.$.slider.chevronRight("invisible"); |
| 117 | - | |
| 118 | - /**/this.$.select_visualization.show();//resize | |
| 120 | + | |
| 121 | + this.$.select_visualization.preselect(); | |
| 119 | 122 | } |
| 120 | 123 | }, |
| 121 | 124 | |
| 122 | 125 | _allowThirdStep : function(){ |
| 123 | - this.$.slider.chevronRight(false); | |
| 124 | - var fields = this.$.select_data.getSelectedFields(); | |
| 125 | - var filters = this.$.select_data.getFilters(); | |
| 126 | - var data = this.$.select_data.getData(); | |
| 127 | - if(fields.length > 0) { | |
| 128 | - this.$.select_visualization.init(); | |
| 129 | - this.$.select_visualization.setFields(fields); | |
| 130 | - this.$.select_visualization.setFilters(filters); | |
| 131 | - this.$.select_visualization.setData(data); | |
| 132 | - this.$.slider.chevronRight(true); | |
| 133 | - } | |
| 126 | +// this.debounce('_allowThirdStep', function () { console.log("_allowThirdStep"); | |
| 127 | + this.$.slider.chevronRight(false); | |
| 128 | + var selectedFields = this.$.select_data.getSelectedFields(); | |
| 129 | + var filters = this.$.select_data.getFilters(); | |
| 130 | + var aggregators = this.$.select_data.getAggregators(); | |
| 131 | + var data = this.$.select_data.getData(); | |
| 132 | + if(selectedFields.length > 0) { | |
| 133 | + this.$.select_visualization.init(); | |
| 134 | + this.$.select_visualization.setSelectedFields(selectedFields); | |
| 135 | + this.$.select_visualization.setFilters(filters); | |
| 136 | + this.$.select_visualization.setAggregators(aggregators); | |
| 137 | + this.$.select_visualization.setData(data); | |
| 138 | + this.$.slider.chevronRight(true); | |
| 139 | + } | |
| 140 | +// }, 300); | |
| 134 | 141 | } |
| 135 | 142 | |
| 136 | 143 | }); | ... | ... |
controllets/expert-query-controllet/demo/index.html
0 โ 100755
| 1 | +<html> | |
| 2 | + | |
| 3 | +<head> | |
| 4 | + <script src="../../shared_js/jquery-1.11.2.min.js"></script> | |
| 5 | + | |
| 6 | + <script src="../../../bower_components/webcomponentsjs/webcomponents-lite.min.js"></script> | |
| 7 | + | |
| 8 | + <link rel="import" href="../expert-query-controllet.html"/> | |
| 9 | + | |
| 10 | + <script src="../../../locales/controllet_ln.js"></script> | |
| 11 | + | |
| 12 | + <script src="../../shared_js/perfect-scrollbar/js/min/perfect-scrollbar.jquery.min.js"></script> | |
| 13 | + <link rel="stylesheet" href="../../shared_js/perfect-scrollbar/css/perfect-scrollbar.min.css"> | |
| 14 | +</head> | |
| 15 | + | |
| 16 | +<body> | |
| 17 | + | |
| 18 | + <style> | |
| 19 | + | |
| 20 | + .container { | |
| 21 | + height: 400px; | |
| 22 | + width: 1200px; | |
| 23 | + position: relative; | |
| 24 | + top: 100px; | |
| 25 | + left:300px; | |
| 26 | + } | |
| 27 | + | |
| 28 | + </style> | |
| 29 | + | |
| 30 | + <div class="container"> | |
| 31 | + <expert-query-controllet id="query"></expert-query-controllet> | |
| 32 | + </div> | |
| 33 | + | |
| 34 | + <script> | |
| 35 | + ln["localization"] = "en"; | |
| 36 | + | |
| 37 | + var fields = ["aaa","bbb", "ccc", "ddd", "eee", "fff"]; | |
| 38 | + var selectedFields = ["ccc","aaa", "eee"]; | |
| 39 | + | |
| 40 | +// query.setFields(fields); | |
| 41 | +// query.setSelectedFields(selectedFields); | |
| 42 | + </script> | |
| 43 | + | |
| 44 | +</body> | |
| 45 | + | |
| 46 | +</html> | |
| 0 | 47 | \ No newline at end of file | ... | ... |
controllets/expert-query-controllet/expert-query-controllet.html
0 โ 100755
| 1 | +<link rel="import" href="../../bower_components/polymer/polymer.html" /> | |
| 2 | + | |
| 3 | +<link rel="import" href="../../bower_components/paper-material/paper-material.html" /> | |
| 4 | + | |
| 5 | +<link rel="import" href="../../bower_components/paper-tabs/paper-tabs.html"> | |
| 6 | +<link rel="import" href="../../bower_components/paper-tabs/paper-tab.html"> | |
| 7 | + | |
| 8 | +<link rel="import" href="../../bower_components/neon-animation/neon-animation.html"> | |
| 9 | +<link rel="import" href="../../bower_components/neon-animation/neon-animatable.html"> | |
| 10 | +<link rel="import" href="../../bower_components/neon-animation/neon-animations.html"> | |
| 11 | + | |
| 12 | +<link rel="import" href="../../bower_components/paper-tooltip/paper-tooltip.html"> | |
| 13 | + | |
| 14 | +<link rel="import" href="../filters-controllet/filters-controllet.html" /> | |
| 15 | +<link rel="import" href="../aggregators-controllet/aggregators-controllet.html" /> | |
| 16 | + | |
| 17 | +<script type="text/javascript" src="../../alasql-utility/alasql.min.js"></script> | |
| 18 | +<script type="text/javascript" src="../../alasql-utility/alasql-utility.js"></script> | |
| 19 | + | |
| 20 | +<dom-module id="expert-query-controllet"> | |
| 21 | + | |
| 22 | + <template> | |
| 23 | + | |
| 24 | + <style is="custom-style"> | |
| 25 | + | |
| 26 | + #expert_container { | |
| 27 | + display: none; | |
| 28 | + height: 100%; | |
| 29 | + width: 100%; | |
| 30 | + } | |
| 31 | + | |
| 32 | + #expert_container * { | |
| 33 | + font-family: 'Roboto', 'Helvetica Neue', Helvetica, Arial, sans-serif; | |
| 34 | + font-size: 16px; | |
| 35 | + line-height: 24px; | |
| 36 | + } | |
| 37 | + | |
| 38 | + #expert_container #neon_container { | |
| 39 | + height: calc(100% - 48px); | |
| 40 | + width: 100%; | |
| 41 | + } | |
| 42 | + | |
| 43 | + #header_open { | |
| 44 | + display: flex; | |
| 45 | + /*background: #B6B6B6;*/ | |
| 46 | + /*border: 1px solid #b6b6b6;*/ | |
| 47 | + /*height: 46px;*/ | |
| 48 | + } | |
| 49 | + | |
| 50 | + #expert_container paper-tabs { | |
| 51 | + /*height: 46px;*/ | |
| 52 | + width: calc(100% - 48px); | |
| 53 | + } | |
| 54 | + | |
| 55 | + #expert_container #query_container { | |
| 56 | + padding: 28px 8px 0px 8px; | |
| 57 | + } | |
| 58 | + | |
| 59 | + #expert_container_close { | |
| 60 | + height: 48px; | |
| 61 | + width: 100%; | |
| 62 | + | |
| 63 | + display: flex; | |
| 64 | + } | |
| 65 | + | |
| 66 | + #expert_container_close * { | |
| 67 | + font-family: 'Roboto', 'Helvetica Neue', Helvetica, Arial, sans-serif; | |
| 68 | + font-size: 16px; | |
| 69 | + line-height: 24px; | |
| 70 | + } | |
| 71 | + | |
| 72 | + #expert_container_close #header_close { | |
| 73 | + height: 24px; | |
| 74 | + width: calc(100% - 384px); | |
| 75 | + padding: 12px 0px; | |
| 76 | + text-align: center; | |
| 77 | + font-weight: 700; | |
| 78 | + | |
| 79 | + color: #00BCD4; | |
| 80 | + background: #FFFFFF; | |
| 81 | + cursor: pointer; | |
| 82 | + } | |
| 83 | + | |
| 84 | + #expert_container_close #space { | |
| 85 | + width: 192px; | |
| 86 | + } | |
| 87 | + | |
| 88 | + paper-tooltip { | |
| 89 | + --paper-tooltip-background: black; | |
| 90 | + } | |
| 91 | + | |
| 92 | + paper-tooltip p { | |
| 93 | + font-family: 'Roboto', 'Helvetica Neue', Helvetica, Arial, sans-serif; | |
| 94 | + font-size: 16px; | |
| 95 | + line-height: 24px; | |
| 96 | + | |
| 97 | + margin: 0; | |
| 98 | + padding: 0; | |
| 99 | + } | |
| 100 | + | |
| 101 | + paper-icon-button { | |
| 102 | + height: 48px; | |
| 103 | + width: 48px; | |
| 104 | + padding: 8px; | |
| 105 | + color: #2196F3; | |
| 106 | + --paper-icon-button-ink-color: #2196F3; | |
| 107 | + } | |
| 108 | + | |
| 109 | + paper-icon-button.disabled{ | |
| 110 | + color: #B6B6B6; | |
| 111 | + } | |
| 112 | + | |
| 113 | + paper-icon-button[icon=fullscreen], | |
| 114 | + paper-icon-button[icon=fullscreen-exit] { | |
| 115 | + height: 48px; | |
| 116 | + width: 48px; | |
| 117 | + padding: 8px; | |
| 118 | + color: #00BCD4; | |
| 119 | + --paper-icon-button-ink-color: #00BCD4; | |
| 120 | + } | |
| 121 | + | |
| 122 | + paper-icon-button[icon=fullscreen] { | |
| 123 | + margin-left: 48px; | |
| 124 | + } | |
| 125 | + | |
| 126 | + paper-tabs { | |
| 127 | + background: #B6B6B6; | |
| 128 | + --paper-tabs-selection-bar-color: #2196F3; | |
| 129 | + } | |
| 130 | + | |
| 131 | + paper-tab { | |
| 132 | + --paper-tab-ink: #2196F3; | |
| 133 | + } | |
| 134 | + | |
| 135 | + paper-tab.iron-selected { | |
| 136 | + font-weight: 700; | |
| 137 | + } | |
| 138 | + | |
| 139 | + /*paper-tab:not(.iron-selected):hover {*/ | |
| 140 | + /*color: #2196F3;*/ | |
| 141 | + /*}*/ | |
| 142 | + | |
| 143 | + paper-tab:hover { | |
| 144 | + color: #2196F3; | |
| 145 | + } | |
| 146 | + | |
| 147 | + </style> | |
| 148 | + | |
| 149 | + <paper-material id="expert_container_close" elevation="5"> | |
| 150 | + <div id="space"></div> | |
| 151 | + | |
| 152 | + <div id="header_close" on-click="_fullscreen"><span id="expert"></span></div> | |
| 153 | + | |
| 154 | + <paper-icon-button id="disable_filters" class=" disabled" icon="filter-list" on-click="_disableFilters"></paper-icon-button> | |
| 155 | + <paper-icon-button id="disable_aggregators" class=" disabled" icon="group-work" on-click="_disableAggregators"></paper-icon-button> | |
| 156 | + <paper-icon-button icon="fullscreen" on-click="_fullscreen"></paper-icon-button> | |
| 157 | + </paper-material> | |
| 158 | + | |
| 159 | + <paper-tooltip for="disable_filters" offset="12" position="top"><p><span id="tooltip_filters"></span></p></paper-tooltip> | |
| 160 | + <paper-tooltip for="disable_aggregators" offset="12" position="top"><p><span id="tooltip_aggregators"></span></p></paper-tooltip> | |
| 161 | + | |
| 162 | + <paper-material id="expert_container" elevation="5"> | |
| 163 | + | |
| 164 | + <div id="header_open"> | |
| 165 | + <paper-tabs selected="{{tabIndex}}"> | |
| 166 | + <paper-tab><span id="filtersTab"></span></paper-tab> | |
| 167 | + <paper-tab><span id="groupByTab"></span></paper-tab> | |
| 168 | + <paper-tab><span id="queryTab"></span></paper-tab> | |
| 169 | + </paper-tabs> | |
| 170 | + | |
| 171 | + <paper-icon-button icon="fullscreen-exit" on-click="_fullscreenExit"></paper-icon-button> | |
| 172 | + </div> | |
| 173 | + | |
| 174 | + <neon-animated-pages id="neon_container" selected="{{tabIndex}}" entry-animation="fade-in-animation" exit-animation="fade-out-animation"> | |
| 175 | + | |
| 176 | + <neon-animatable> | |
| 177 | + <filters-controllet id="filters"></filters-controllet> | |
| 178 | + </neon-animatable> | |
| 179 | + | |
| 180 | + <neon-animatable> | |
| 181 | + <aggregators-controllet id="aggregators"></aggregators-controllet> | |
| 182 | + </neon-animatable> | |
| 183 | + | |
| 184 | + <neon-animatable> | |
| 185 | + <div id="query_container"></div> | |
| 186 | + </neon-animatable> | |
| 187 | + | |
| 188 | + </neon-animated-pages> | |
| 189 | + | |
| 190 | + | |
| 191 | + </paper-material> | |
| 192 | + | |
| 193 | + </template> | |
| 194 | + | |
| 195 | + <script> | |
| 196 | + | |
| 197 | + Polymer({ | |
| 198 | + | |
| 199 | + is : 'expert-query-controllet', | |
| 200 | + | |
| 201 | + properties : { | |
| 202 | + | |
| 203 | + tabIndex: { | |
| 204 | + type: Number, | |
| 205 | + value: -1 | |
| 206 | + }, | |
| 207 | + | |
| 208 | + fields : { | |
| 209 | + type : Array, | |
| 210 | + value : [] | |
| 211 | + }, | |
| 212 | + | |
| 213 | + selectedFields : { | |
| 214 | + type : Array, | |
| 215 | + value : [] | |
| 216 | + }, | |
| 217 | + | |
| 218 | + filters : { | |
| 219 | + type : Array, | |
| 220 | + value : [] | |
| 221 | + }, | |
| 222 | + | |
| 223 | + aggregators : { | |
| 224 | + type : Array, | |
| 225 | + value : [] | |
| 226 | + } | |
| 227 | + | |
| 228 | + }, | |
| 229 | + | |
| 230 | + listeners: { | |
| 231 | + 'filters-controllet_filters': '_updateFilters', | |
| 232 | + 'aggregators-controllet_aggregators': '_updateAggregators' | |
| 233 | + }, | |
| 234 | + | |
| 235 | + ready : function() { | |
| 236 | + }, | |
| 237 | + | |
| 238 | + attached : function() { | |
| 239 | + this._translate(); | |
| 240 | + }, | |
| 241 | + | |
| 242 | + setFields : function(fields) { | |
| 243 | + this.fields = fields; | |
| 244 | + | |
| 245 | + this.$.filters.setFields(fields); | |
| 246 | + this.$.aggregators.setFields(fields); | |
| 247 | + }, | |
| 248 | + | |
| 249 | + setSelectedFields : function(selectedFields) { | |
| 250 | + this.selectedFields = selectedFields; | |
| 251 | + | |
| 252 | + this.$.filters.setSelectedFields(selectedFields); | |
| 253 | + this.$.aggregators.setSelectedFields(selectedFields); | |
| 254 | + | |
| 255 | + this._updateQuery(); | |
| 256 | + }, | |
| 257 | + | |
| 258 | + setFilters : function(filters) { | |
| 259 | + this.async(function() { | |
| 260 | + this.$.filters.setFilters(filters); | |
| 261 | + }, 0); | |
| 262 | + }, | |
| 263 | + | |
| 264 | + setAggregators : function(aggregators) { | |
| 265 | + this.async(function() { | |
| 266 | + this.$.aggregators.setAggregators(aggregators); | |
| 267 | + }, 0); | |
| 268 | + }, | |
| 269 | + | |
| 270 | + reset : function() { | |
| 271 | + this.$.filters.reset(); | |
| 272 | + this.$.aggregators.reset(); | |
| 273 | + this.fields = []; | |
| 274 | + this.selectedFields = []; | |
| 275 | + this.filters = []; | |
| 276 | + this.aggregators = []; | |
| 277 | +// this.query = ""; | |
| 278 | + }, | |
| 279 | + | |
| 280 | + _translate : function() { | |
| 281 | + this.$.expert.innerHTML = ln["expert_" + ln["localization"]]; | |
| 282 | + this.$.filtersTab.innerHTML = ln["filters_" + ln["localization"]]; | |
| 283 | + this.$.groupByTab.innerHTML = ln["groupBy_" + ln["localization"]]; | |
| 284 | + this.$.queryTab.innerHTML = ln["query_" + ln["localization"]]; | |
| 285 | + this.$.tooltip_filters.innerHTML = ln["enableFilters_" + ln["localization"]]; | |
| 286 | + this.$.tooltip_aggregators.innerHTML = ln["enableGroupBy_" + ln["localization"]]; | |
| 287 | + }, | |
| 288 | + | |
| 289 | + _fullscreen : function() { | |
| 290 | + this.$.expert_container_close.style.display = "none"; | |
| 291 | + this.$.expert_container.style.display = "block"; | |
| 292 | + | |
| 293 | + if(this.tabIndex == -1) | |
| 294 | + this.tabIndex = 0; | |
| 295 | + | |
| 296 | + this.fire('expert-controllet_show', {show: true}); | |
| 297 | + }, | |
| 298 | + | |
| 299 | + _fullscreenExit : function() { | |
| 300 | + this.$.expert_container_close.style.display = "flex"; | |
| 301 | + this.$.expert_container.style.display = "none"; | |
| 302 | + | |
| 303 | + this.fire('expert-controllet_show', {show: false}); | |
| 304 | + }, | |
| 305 | + | |
| 306 | + _updateFilters : function(e) { | |
| 307 | + this.filters = e.detail.filters; | |
| 308 | + this._updateQuery(); | |
| 309 | + this._disableFiltersIcon(e.detail.filters); | |
| 310 | + }, | |
| 311 | + | |
| 312 | + _disableFilters : function() { | |
| 313 | + this.$.filters._disableFilters(); | |
| 314 | + }, | |
| 315 | + | |
| 316 | + _disableFiltersIcon : function(filters) { | |
| 317 | + var classes = this.$.disable_filters.className; | |
| 318 | + if (filters.length > 1) { | |
| 319 | + this.$.disable_filters.className = classes.replace(" disabled", ""); | |
| 320 | + this.$.tooltip_filters.innerHTML = ln["disableFilters_" + ln["localization"]]; | |
| 321 | + } | |
| 322 | + else if (classes.indexOf("disabled") == -1) { | |
| 323 | + this.$.disable_filters.className = classes + " disabled"; | |
| 324 | + this.$.tooltip_filters.innerHTML = ln["enableFilters_" + ln["localization"]]; | |
| 325 | + } | |
| 326 | + }, | |
| 327 | + | |
| 328 | + _updateAggregators : function(e) { | |
| 329 | + this.aggregators = e.detail.aggregators; | |
| 330 | + this._updateQuery(); | |
| 331 | + this._disableAggregatorsIcon(e.detail.aggregators); | |
| 332 | + }, | |
| 333 | + | |
| 334 | + _disableAggregators : function() { | |
| 335 | + this.$.aggregators._disableAggregators(); | |
| 336 | + }, | |
| 337 | + | |
| 338 | + _disableAggregatorsIcon : function(aggregators) { | |
| 339 | + var classes = this.$.disable_aggregators.className; | |
| 340 | + if (aggregators.length > 0) { | |
| 341 | + this.$.disable_aggregators.className = classes.replace(" disabled", ""); | |
| 342 | + this.$.tooltip_aggregators.innerHTML = ln["disableGroupBy_" + ln["localization"]]; | |
| 343 | + } | |
| 344 | + else if (classes.indexOf("disabled") == -1) { | |
| 345 | + this.$.disable_aggregators.className = classes + " disabled"; | |
| 346 | + this.$.tooltip_aggregators.innerHTML = ln["enableGroupBy_" + ln["localization"]]; | |
| 347 | + } | |
| 348 | + }, | |
| 349 | + | |
| 350 | + _updateQuery : function() { | |
| 351 | + if(this.selectedFields.length) | |
| 352 | + this.$.query_container.innerHTML = alasql_QUERY_string(this.selectedFields, this.filters, this.aggregators, null) | |
| 353 | + .replace('SELECT', '<span style="color:#2196F3; font-weight: 700;">SELECT</span>') | |
| 354 | +// .replace('FROM ?', '<br><br><span style="color:#2196F3; font-weight: 700;">FROM</span> dataset') | |
| 355 | + .replace('FROM ?', '') | |
| 356 | + .replace('WHERE', '<br><br><span style="color:#2196F3; font-weight: 700;">WHERE</span>') | |
| 357 | + .replace('GROUP BY', '<br><br><span style="color:#2196F3; font-weight: 700;">GROUP BY</span>') | |
| 358 | + .replace(/\[/g, '') | |
| 359 | + .replace(/\]/g, ''); | |
| 360 | + else | |
| 361 | + this.$.query_container.innerHTML = ""; | |
| 362 | + } | |
| 363 | + | |
| 364 | + }); | |
| 365 | + | |
| 366 | + </script> | |
| 367 | + | |
| 368 | +</dom-module> | |
| 0 | 369 | \ No newline at end of file | ... | ... |
controllets/filters-controllet/filters-controllet.html
| 1 | 1 | <link rel="import" href="../../bower_components/polymer/polymer.html" /> |
| 2 | 2 | |
| 3 | -<link rel="import" href="../../bower_components/paper-material/paper-material.html" /> | |
| 4 | - | |
| 5 | 3 | <link rel="import" href="../../bower_components/paper-dropdown-menu/paper-dropdown-menu.html"> |
| 6 | 4 | <link rel="import" href="../../bower_components/paper-menu/paper-menu.html"> |
| 7 | 5 | <link rel="import" href="../../bower_components/paper-item/paper-item.html"> |
| ... | ... | @@ -19,8 +17,9 @@ |
| 19 | 17 | <style is="custom-style"> |
| 20 | 18 | |
| 21 | 19 | #filters_container { |
| 22 | - height: 48px; | |
| 20 | + height: 100%; | |
| 23 | 21 | width: 100%; |
| 22 | + position: relative; | |
| 24 | 23 | } |
| 25 | 24 | |
| 26 | 25 | #filters_container * { |
| ... | ... | @@ -29,37 +28,6 @@ |
| 29 | 28 | line-height: 24px; |
| 30 | 29 | } |
| 31 | 30 | |
| 32 | - #filters_container #header { | |
| 33 | - height: 32px; | |
| 34 | - padding-top: 16px; | |
| 35 | - text-align: center; | |
| 36 | - font-weight: 700; | |
| 37 | - | |
| 38 | - background: #FFFFFF; | |
| 39 | - color: #00BCD4; | |
| 40 | - cursor: pointer; | |
| 41 | - } | |
| 42 | - | |
| 43 | - #filters_container #header.hide{ | |
| 44 | - color: #00BCD4; | |
| 45 | - background: #FFFFFF; | |
| 46 | - } | |
| 47 | - | |
| 48 | - /*#filters_container #header.hide:hover{*/ | |
| 49 | - /*}*/ | |
| 50 | - | |
| 51 | - #filters_container #header.show{ | |
| 52 | - color: #000000; | |
| 53 | - background: #B6B6B6; | |
| 54 | - } | |
| 55 | - | |
| 56 | - #filters_container #panel { | |
| 57 | - display: none; | |
| 58 | - position: relative; | |
| 59 | - height: calc(100% - 48px); | |
| 60 | - background: #FFFFFF; | |
| 61 | - } | |
| 62 | - | |
| 63 | 31 | paper-dropdown-menu { |
| 64 | 32 | width: 100%; |
| 65 | 33 | --paper-input-container-focus-color: #2196F3; |
| ... | ... | @@ -87,11 +55,34 @@ |
| 87 | 55 | } |
| 88 | 56 | |
| 89 | 57 | paper-button { |
| 90 | - margin: 0px; | |
| 91 | - height: 44px; | |
| 58 | + margin: 0; | |
| 59 | + height: 48px; | |
| 60 | + padding: 12px; | |
| 92 | 61 | color: #FFFFFF; |
| 93 | 62 | background: #2196F3; |
| 94 | 63 | font-weight: 700; |
| 64 | + | |
| 65 | + min-width: 96px; | |
| 66 | + } | |
| 67 | + | |
| 68 | + paper-button#disable_filters { | |
| 69 | + position: absolute; | |
| 70 | + bottom: 0; | |
| 71 | + right: 0; | |
| 72 | + margin: 0 8px 8px 0; | |
| 73 | + | |
| 74 | + min-width: 192px; | |
| 75 | + } | |
| 76 | + | |
| 77 | + paper-button#disable_filters.disabled { | |
| 78 | + background-color: #B6B6B6; | |
| 79 | + } | |
| 80 | + | |
| 81 | + iron-icon[icon=filter-list] { | |
| 82 | + height: 32px; | |
| 83 | + width: 32px; | |
| 84 | + color: #FFFFFF; | |
| 85 | + margin-top: -4px; | |
| 95 | 86 | } |
| 96 | 87 | |
| 97 | 88 | paper-button:hover { |
| ... | ... | @@ -138,7 +129,8 @@ |
| 138 | 129 | height: 44px; |
| 139 | 130 | width: calc(100% - 40px); |
| 140 | 131 | padding: 8px 0px; |
| 141 | - text-align: right; | |
| 132 | + /*text-align: right;*/ | |
| 133 | + text-align: center; | |
| 142 | 134 | } |
| 143 | 135 | |
| 144 | 136 | #filters_container .row2 { |
| ... | ... | @@ -147,7 +139,7 @@ |
| 147 | 139 | width: 100%; |
| 148 | 140 | } |
| 149 | 141 | |
| 150 | - #filters_container .row2 .highlighted { | |
| 142 | + .highlighted { | |
| 151 | 143 | color: #2196F3; |
| 152 | 144 | font-weight: 700; |
| 153 | 145 | } |
| ... | ... | @@ -162,16 +154,11 @@ |
| 162 | 154 | height: 40px; |
| 163 | 155 | width: 40px; |
| 164 | 156 | padding: 4px 8px; |
| 165 | - | |
| 166 | 157 | } |
| 167 | 158 | |
| 168 | 159 | </style> |
| 169 | 160 | |
| 170 | - <paper-material id="filters_container" elevation="5"> | |
| 171 | - | |
| 172 | - <div id="header" class="hide" on-click="_showFiltersPanel"><span id="filters"><span id="addFilters"></span></span></div> | |
| 173 | - | |
| 174 | - <div id="panel"> | |
| 161 | + <div id="filters_container"> | |
| 175 | 162 | |
| 176 | 163 | <div class="row"> |
| 177 | 164 | <div class="ddl_container"> |
| ... | ... | @@ -209,7 +196,7 @@ |
| 209 | 196 | <template is="dom-if" if="{{index}}"><!--excludes logicalOperator--> |
| 210 | 197 | <div class="row2"> |
| 211 | 198 | <div class="filter"> |
| 212 | - {{item.field}} <span class="highlighted">{{_getOperationlName(item.operation)}}</span> "{{item.value}}" <span class="highlighted">{{_getLogicalOperator(index)}}</span> | |
| 199 | + {{item.field}} <span class="highlighted">{{_getOperationlName(item.operation)}}</span> "{{item.value}}" <span class="highlighted">{{_getLogicalOperator(index)}}</span> | |
| 213 | 200 | </div> |
| 214 | 201 | <div class="remove_container"> |
| 215 | 202 | <paper-icon-button on-click="_deleteFilter" icon="cancel" class="cancel"></paper-icon-button> |
| ... | ... | @@ -218,9 +205,9 @@ |
| 218 | 205 | </template> |
| 219 | 206 | </template> |
| 220 | 207 | |
| 221 | - </div> | |
| 208 | + <paper-button id="disable_filters" raised on-click="_disableFilters"><iron-icon icon="filter-list"></iron-icon> <span id="disable_enable"></span></paper-button> | |
| 222 | 209 | |
| 223 | - </paper-material> | |
| 210 | + </div> | |
| 224 | 211 | |
| 225 | 212 | </template> |
| 226 | 213 | |
| ... | ... | @@ -245,18 +232,12 @@ |
| 245 | 232 | filters : { |
| 246 | 233 | type : Array, |
| 247 | 234 | value : [{logicalOperator: "AND"}] |
| 248 | - }, | |
| 249 | - | |
| 250 | - show : { | |
| 251 | - type : Boolean, | |
| 252 | - value : false | |
| 253 | 235 | } |
| 254 | 236 | |
| 255 | 237 | }, |
| 256 | 238 | |
| 257 | 239 | ready : function() { |
| 258 | - $(this.$.panel).perfectScrollbar(); | |
| 259 | -// this._showFiltersPanel();gi | |
| 240 | + $(this.$.filters_container).perfectScrollbar(); | |
| 260 | 241 | this.logicalOperator = "AND"; |
| 261 | 242 | }, |
| 262 | 243 | |
| ... | ... | @@ -266,7 +247,10 @@ |
| 266 | 247 | |
| 267 | 248 | setFields : function(fields) { |
| 268 | 249 | this.fields = this._copy(fields); |
| 269 | - this.fields = fields; | |
| 250 | + }, | |
| 251 | + | |
| 252 | + setSelectedFields : function(selectedFields) { | |
| 253 | + this.selectedFields = this._copy(selectedFields); | |
| 270 | 254 | }, |
| 271 | 255 | |
| 272 | 256 | setFilters : function(filters) { |
| ... | ... | @@ -283,43 +267,26 @@ |
| 283 | 267 | |
| 284 | 268 | reset : function() { |
| 285 | 269 | this.fields = []; |
| 270 | + this.selectedFields = []; | |
| 286 | 271 | this.filters = [{logicalOperator: "AND"}]; |
| 287 | 272 | }, |
| 288 | 273 | |
| 289 | 274 | _translate : function() { |
| 290 | - this.$.addFilters.innerHTML = ln["expertAddFilters_" + ln["localization"]]; | |
| 291 | 275 | this.$.filter_field.setAttribute("label", ln["filterField_" + ln["localization"]]); |
| 292 | 276 | this.$.filter_operation.setAttribute("label", ln["filterOperation_" + ln["localization"]]); |
| 293 | 277 | this.$.filter_value.setAttribute("label", ln["filterValue_" + ln["localization"]]); |
| 278 | + | |
| 279 | + this.$.disable_enable.innerHTML = ln["disableFilters_" + ln["localization"]]; | |
| 294 | 280 | }, |
| 295 | 281 | |
| 296 | 282 | _fieldName : function(field) { |
| 297 | 283 | return field.substring(field.lastIndexOf(",")+1, field.length); |
| 298 | 284 | }, |
| 299 | 285 | |
| 300 | - _showFiltersPanel : function() { | |
| 301 | -// ? filter class hiddend & hover: | |
| 302 | - | |
| 303 | - if(!this.show) { | |
| 304 | - this.$.filters_container.style.height = "100%"; | |
| 305 | - $(this.$.header).removeClass("hide"); | |
| 306 | - $(this.$.header).addClass("show"); | |
| 307 | - this.$.panel.style.display = "block"; | |
| 308 | - | |
| 309 | - } | |
| 310 | - else { | |
| 311 | - this.$.filters_container.style.height = "48px"; | |
| 312 | - $(this.$.header).removeClass("show"); | |
| 313 | - $(this.$.header).addClass("hide"); | |
| 314 | - this.$.panel.style.display = "none"; | |
| 315 | - } | |
| 316 | - | |
| 317 | - this.fire('filters-controllet_show', {show: this.show}); | |
| 318 | - | |
| 319 | - this.show = !this.show; | |
| 320 | - }, | |
| 321 | - | |
| 322 | 286 | _fire : function() { |
| 287 | + this.$.disable_enable.innerHTML = ln["disableFilters_" + ln["localization"]]; | |
| 288 | + this.$.disable_filters.className = this.$.disable_filters.className.replace(" disabled", ""); | |
| 289 | + | |
| 323 | 290 | if (this.filters.length > 1) |
| 324 | 291 | this.fire('filters-controllet_filters', {filters: this.filters}); |
| 325 | 292 | else |
| ... | ... | @@ -331,13 +298,8 @@ |
| 331 | 298 | var field = this.$.filter_field.value; |
| 332 | 299 | var id = this.$.filter_operation.selectedItem.id; |
| 333 | 300 | var operation = this.operations[id]; |
| 334 | -// var operation = this.$.filter_operation.value; | |
| 335 | 301 | var value = this.$.filter_value.value; |
| 336 | 302 | |
| 337 | -// var filters = this.filters; | |
| 338 | -// filters.push({"field": field, "operation": operation, "value": value}); | |
| 339 | -// this.filters = filters; | |
| 340 | - | |
| 341 | 303 | this.filters.push({"field": field, "operation": operation, "value": value}); |
| 342 | 304 | |
| 343 | 305 | this.$.filter_field_menu.select(-1); |
| ... | ... | @@ -353,10 +315,6 @@ |
| 353 | 315 | _deleteFilter : function(e) { |
| 354 | 316 | var index = e.model.index; |
| 355 | 317 | |
| 356 | -// var filters = this.filters; | |
| 357 | -// filters.splice(index, 1); | |
| 358 | -// this.filters = this._copy(filters); | |
| 359 | - | |
| 360 | 318 | this.filters.splice(index, 1); |
| 361 | 319 | |
| 362 | 320 | this._fire(); |
| ... | ... | @@ -366,28 +324,8 @@ |
| 366 | 324 | |
| 367 | 325 | _getOperationlName: function(operation) { |
| 368 | 326 | return ln[operation + "_" + ln["localization"]]; |
| 369 | -// if(operation.indexOf("not") > -1) | |
| 370 | -// return ln["notContains_" + ln["localization"]]; | |
| 371 | -// if(operation.indexOf("contains") > -1) | |
| 372 | -// return ln["contains_" + ln["localization"]]; | |
| 373 | -// if(operation.indexOf("start") > -1) | |
| 374 | -// return ln["start_" + ln["localization"]]; | |
| 375 | -// if(operation.indexOf("ends") > -1) | |
| 376 | -// return ln["ends_" + ln["localization"]]; | |
| 377 | -// return operation; | |
| 378 | 327 | }, |
| 379 | 328 | |
| 380 | -// _changeLogicalOperator : function() { | |
| 381 | -// if(this.logicalOperator == "AND") | |
| 382 | -// this.logicalOperator = "OR"; | |
| 383 | -// else | |
| 384 | -// this.logicalOperator = "AND"; | |
| 385 | -// | |
| 386 | -// this._fire(); | |
| 387 | -// | |
| 388 | -// this._renderFilters(); | |
| 389 | -// }, | |
| 390 | - | |
| 391 | 329 | _changeLogicalOperator : function() { |
| 392 | 330 | if(this.logicalOperator == "AND") |
| 393 | 331 | this.logicalOperator = "OR"; |
| ... | ... | @@ -416,6 +354,20 @@ |
| 416 | 354 | return this.filters[0].logicalOperator; |
| 417 | 355 | }, |
| 418 | 356 | |
| 357 | + _disableFilters : function() { | |
| 358 | + var classes = this.$.disable_filters.className; | |
| 359 | + if (classes.indexOf("disabled") > -1) { | |
| 360 | +// this.$.disable_enable.innerHTML = ln["disableFilters_" + ln["localization"]]; | |
| 361 | +// this.$.disable_filters.className = classes.replace(" disabled", ""); | |
| 362 | + this._fire(); | |
| 363 | + } | |
| 364 | + else { | |
| 365 | + this.$.disable_enable.innerHTML = ln["enableFilters_" + ln["localization"]]; | |
| 366 | + this.$.disable_filters.className = classes + " disabled"; | |
| 367 | + this.fire('filters-controllet_filters', {filters: []}); | |
| 368 | + } | |
| 369 | + }, | |
| 370 | + | |
| 419 | 371 | _copy : function(o) { |
| 420 | 372 | var out, v, key; |
| 421 | 373 | out = Array.isArray(o) ? [] : {}; | ... | ... |
controllets/filters-controllet/filters-controllet_old.html
0 โ 100755
| 1 | +<link rel="import" href="../../bower_components/polymer/polymer.html" /> | |
| 2 | + | |
| 3 | +<link rel="import" href="../../bower_components/paper-material/paper-material.html" /> | |
| 4 | + | |
| 5 | +<link rel="import" href="../../bower_components/paper-dropdown-menu/paper-dropdown-menu.html"> | |
| 6 | +<link rel="import" href="../../bower_components/paper-menu/paper-menu.html"> | |
| 7 | +<link rel="import" href="../../bower_components/paper-item/paper-item.html"> | |
| 8 | + | |
| 9 | +<link rel="import" href="../../bower_components/paper-icon-button/paper-icon-button.html"> | |
| 10 | +<link rel="import" href="../../bower_components/iron-icons/iron-icons.html"> | |
| 11 | +<link rel="import" href="../../bower_components/iron-icon/iron-icon.html"> | |
| 12 | + | |
| 13 | +<link rel="import" href="../../bower_components/paper-button/paper-button.html"> | |
| 14 | + | |
| 15 | +<dom-module id="filters-controllet"> | |
| 16 | + | |
| 17 | + <template> | |
| 18 | + | |
| 19 | + <style is="custom-style"> | |
| 20 | + | |
| 21 | + #filters_container { | |
| 22 | + height: 48px; | |
| 23 | + width: 100%; | |
| 24 | + } | |
| 25 | + | |
| 26 | + #filters_container * { | |
| 27 | + font-family: 'Roboto', 'Helvetica Neue', Helvetica, Arial, sans-serif; | |
| 28 | + font-size: 16px; | |
| 29 | + line-height: 24px; | |
| 30 | + } | |
| 31 | + | |
| 32 | + #filters_container #header { | |
| 33 | + height: 32px; | |
| 34 | + padding-top: 16px; | |
| 35 | + text-align: center; | |
| 36 | + font-weight: 700; | |
| 37 | + | |
| 38 | + background: #FFFFFF; | |
| 39 | + color: #00BCD4; | |
| 40 | + cursor: pointer; | |
| 41 | + } | |
| 42 | + | |
| 43 | + #filters_container #header.hide{ | |
| 44 | + color: #00BCD4; | |
| 45 | + background: #FFFFFF; | |
| 46 | + } | |
| 47 | + | |
| 48 | + /*#filters_container #header.hide:hover{*/ | |
| 49 | + /*}*/ | |
| 50 | + | |
| 51 | + #filters_container #header.show{ | |
| 52 | + color: #000000; | |
| 53 | + background: #B6B6B6; | |
| 54 | + } | |
| 55 | + | |
| 56 | + #filters_container #panel { | |
| 57 | + display: none; | |
| 58 | + position: relative; | |
| 59 | + height: calc(100% - 48px); | |
| 60 | + background: #FFFFFF; | |
| 61 | + } | |
| 62 | + | |
| 63 | + paper-dropdown-menu { | |
| 64 | + width: 100%; | |
| 65 | + --paper-input-container-focus-color: #2196F3; | |
| 66 | + } | |
| 67 | + | |
| 68 | + :host { | |
| 69 | + --paper-dropdown-menu-icon: { | |
| 70 | + color: #2196F3; | |
| 71 | + }; | |
| 72 | + } | |
| 73 | + | |
| 74 | + paper-item { | |
| 75 | + min-width: 128px; | |
| 76 | + white-space: nowrap; | |
| 77 | + } | |
| 78 | + | |
| 79 | + paper-item.iron-selected { | |
| 80 | + background-color: #2196F3; | |
| 81 | + color: #FFFFFF; | |
| 82 | + } | |
| 83 | + | |
| 84 | + paper-input { | |
| 85 | + width: 100%; | |
| 86 | + --paper-input-container-focus-color: #2196F3; | |
| 87 | + } | |
| 88 | + | |
| 89 | + paper-button { | |
| 90 | + margin: 0px; | |
| 91 | + height: 44px; | |
| 92 | + color: #FFFFFF; | |
| 93 | + background: #2196F3; | |
| 94 | + font-weight: 700; | |
| 95 | + } | |
| 96 | + | |
| 97 | + paper-button:hover { | |
| 98 | + box-shadow: 0px 8px 12px #888; | |
| 99 | + -webkit-box-shadow: 0px 8px 12px #888; | |
| 100 | + -moz-box-shadow: 0px 8px 12px #888; | |
| 101 | + } | |
| 102 | + | |
| 103 | + paper-icon-button { | |
| 104 | + padding: 4px; | |
| 105 | + } | |
| 106 | + | |
| 107 | + paper-icon-button.add { | |
| 108 | + color: #2196F3; | |
| 109 | + --paper-icon-button-ink-color: #2196F3; | |
| 110 | + } | |
| 111 | + | |
| 112 | + paper-icon-button.cancel { | |
| 113 | + color: #F44336; | |
| 114 | + --paper-icon-button-ink-color: #F44336; | |
| 115 | + } | |
| 116 | + | |
| 117 | + #filters_container .row { | |
| 118 | + display: flex; | |
| 119 | + height: 60px; | |
| 120 | + width: 100%; | |
| 121 | + } | |
| 122 | + | |
| 123 | + #filters_container .ddl_container { | |
| 124 | + display: flex; | |
| 125 | + height: 60px; | |
| 126 | + width: 25%; | |
| 127 | + padding: 0px 8px; | |
| 128 | + } | |
| 129 | + | |
| 130 | + #filters_container .add_container { | |
| 131 | + height: 40px; | |
| 132 | + width: 40px; | |
| 133 | + padding: 10px 0px; | |
| 134 | + } | |
| 135 | + | |
| 136 | + #filters_container .andOr_container { | |
| 137 | + display: inline-block; | |
| 138 | + height: 44px; | |
| 139 | + width: calc(100% - 40px); | |
| 140 | + padding: 8px 0px; | |
| 141 | + text-align: right; | |
| 142 | + } | |
| 143 | + | |
| 144 | + #filters_container .row2 { | |
| 145 | + display: flex; | |
| 146 | + height: 48px; | |
| 147 | + width: 100%; | |
| 148 | + } | |
| 149 | + | |
| 150 | + #filters_container .row2 .highlighted { | |
| 151 | + color: #2196F3; | |
| 152 | + font-weight: 700; | |
| 153 | + } | |
| 154 | + | |
| 155 | + #filters_container .filter { | |
| 156 | + height: 24px; | |
| 157 | + width: calc(75% - 16px); | |
| 158 | + padding: 12px 8px; | |
| 159 | + } | |
| 160 | + | |
| 161 | + #filters_container .remove_container { | |
| 162 | + height: 40px; | |
| 163 | + width: 40px; | |
| 164 | + padding: 4px 8px; | |
| 165 | + | |
| 166 | + } | |
| 167 | + | |
| 168 | + </style> | |
| 169 | + | |
| 170 | + <paper-material id="filters_container" elevation="5"> | |
| 171 | + | |
| 172 | + <div id="header" class="hide" on-click="_showFiltersPanel"><span id="filters"><span id="addFilters"></span></span></div> | |
| 173 | + | |
| 174 | + <div id="panel"> | |
| 175 | + | |
| 176 | + <div class="row"> | |
| 177 | + <div class="ddl_container"> | |
| 178 | + <paper-dropdown-menu id="filter_field" label="Field"> | |
| 179 | + <paper-menu id="filter_field_menu" class="dropdown-content"> | |
| 180 | + <template is="dom-repeat" items={{fields}}> | |
| 181 | + <paper-item id={{index}}>{{_fieldName(item)}}</paper-item> | |
| 182 | + </template> | |
| 183 | + </paper-menu> | |
| 184 | + </paper-dropdown-menu> | |
| 185 | + </div> | |
| 186 | + <div class="ddl_container"> | |
| 187 | + <paper-dropdown-menu id="filter_operation" label="Operation"> | |
| 188 | + <paper-menu id="filter_operation_menu" class="dropdown-content"> | |
| 189 | + <template is="dom-repeat" items={{operations}}> | |
| 190 | + <paper-item id={{index}}>{{_getOperationlName(item)}}</paper-item> | |
| 191 | + </template> | |
| 192 | + </paper-menu> | |
| 193 | + </paper-dropdown-menu> | |
| 194 | + </div> | |
| 195 | + <div class="ddl_container"> | |
| 196 | + <paper-input id="filter_value" label="Value" class="base_input" maxlength="32" auto-validate pattern="^[.:,;+-_ a-zA-Z0-9]*" error-message="Invalid value!"></paper-input> | |
| 197 | + </div> | |
| 198 | + <div class="ddl_container"> | |
| 199 | + <div class="add_container"> | |
| 200 | + <paper-icon-button on-click="_addFilter" icon="add-circle" class="add"></paper-icon-button> | |
| 201 | + </div> | |
| 202 | + <div class="andOr_container"> | |
| 203 | + <paper-button raised on-click="_changeLogicalOperator"><span id="andOr">{{logicalOperator}}</span></paper-button> | |
| 204 | + </div> | |
| 205 | + </div> | |
| 206 | + </div> | |
| 207 | + | |
| 208 | + <template is="dom-repeat" items={{filters}}> | |
| 209 | + <template is="dom-if" if="{{index}}"><!--excludes logicalOperator--> | |
| 210 | + <div class="row2"> | |
| 211 | + <div class="filter"> | |
| 212 | + {{item.field}} <span class="highlighted">{{_getOperationlName(item.operation)}}</span> "{{item.value}}" <span class="highlighted">{{_getLogicalOperator(index)}}</span> | |
| 213 | + </div> | |
| 214 | + <div class="remove_container"> | |
| 215 | + <paper-icon-button on-click="_deleteFilter" icon="cancel" class="cancel"></paper-icon-button> | |
| 216 | + </div> | |
| 217 | + </div> | |
| 218 | + </template> | |
| 219 | + </template> | |
| 220 | + | |
| 221 | + </div> | |
| 222 | + | |
| 223 | + </paper-material> | |
| 224 | + | |
| 225 | + </template> | |
| 226 | + | |
| 227 | + <script> | |
| 228 | + | |
| 229 | + Polymer({ | |
| 230 | + | |
| 231 | + is : 'filters-controllet', | |
| 232 | + | |
| 233 | + properties : { | |
| 234 | + | |
| 235 | + fields : { | |
| 236 | + type : Array, | |
| 237 | + value : [] | |
| 238 | + }, | |
| 239 | + | |
| 240 | + operations : { | |
| 241 | + type : Array, | |
| 242 | + value : ["=", "!=", ">", ">=", "<", "<=", "contains", "notContains", "start", "ends"] | |
| 243 | + }, | |
| 244 | + | |
| 245 | + filters : { | |
| 246 | + type : Array, | |
| 247 | + value : [{logicalOperator: "AND"}] | |
| 248 | + }, | |
| 249 | + | |
| 250 | + show : { | |
| 251 | + type : Boolean, | |
| 252 | + value : false | |
| 253 | + } | |
| 254 | + | |
| 255 | + }, | |
| 256 | + | |
| 257 | + ready : function() { | |
| 258 | + $(this.$.panel).perfectScrollbar(); | |
| 259 | +// this._showFiltersPanel();gi | |
| 260 | + this.logicalOperator = "AND"; | |
| 261 | + }, | |
| 262 | + | |
| 263 | + attached : function() { | |
| 264 | + this._translate(); | |
| 265 | + }, | |
| 266 | + | |
| 267 | + setFields : function(fields) { | |
| 268 | + this.fields = this._copy(fields); | |
| 269 | + this.fields = fields; | |
| 270 | + }, | |
| 271 | + | |
| 272 | + setFilters : function(filters) { | |
| 273 | + if(filters && filters.length > 0) { | |
| 274 | + this.filters = this._copy(filters); | |
| 275 | + this.logicalOperator = this.filters[0].logicalOperator; | |
| 276 | + this._fire(); | |
| 277 | + } | |
| 278 | + }, | |
| 279 | + | |
| 280 | + getFilters : function() { | |
| 281 | + return this.filters; | |
| 282 | + }, | |
| 283 | + | |
| 284 | + reset : function() { | |
| 285 | + this.fields = []; | |
| 286 | + this.filters = [{logicalOperator: "AND"}]; | |
| 287 | + }, | |
| 288 | + | |
| 289 | + _translate : function() { | |
| 290 | + this.$.addFilters.innerHTML = ln["expertAddFilters_" + ln["localization"]]; | |
| 291 | + this.$.filter_field.setAttribute("label", ln["filterField_" + ln["localization"]]); | |
| 292 | + this.$.filter_operation.setAttribute("label", ln["filterOperation_" + ln["localization"]]); | |
| 293 | + this.$.filter_value.setAttribute("label", ln["filterValue_" + ln["localization"]]); | |
| 294 | + }, | |
| 295 | + | |
| 296 | + _fieldName : function(field) { | |
| 297 | + return field.substring(field.lastIndexOf(",")+1, field.length); | |
| 298 | + }, | |
| 299 | + | |
| 300 | + _showFiltersPanel : function() { | |
| 301 | +// ? filter class hiddend & hover: | |
| 302 | + | |
| 303 | + if(!this.show) { | |
| 304 | + this.$.filters_container.style.height = "100%"; | |
| 305 | + $(this.$.header).removeClass("hide"); | |
| 306 | + $(this.$.header).addClass("show"); | |
| 307 | + this.$.panel.style.display = "block"; | |
| 308 | + | |
| 309 | + } | |
| 310 | + else { | |
| 311 | + this.$.filters_container.style.height = "48px"; | |
| 312 | + $(this.$.header).removeClass("show"); | |
| 313 | + $(this.$.header).addClass("hide"); | |
| 314 | + this.$.panel.style.display = "none"; | |
| 315 | + } | |
| 316 | + | |
| 317 | + this.fire('filters-controllet_show', {show: this.show}); | |
| 318 | + | |
| 319 | + this.show = !this.show; | |
| 320 | + }, | |
| 321 | + | |
| 322 | + _fire : function() { | |
| 323 | + if (this.filters.length > 1) | |
| 324 | + this.fire('filters-controllet_filters', {filters: this.filters}); | |
| 325 | + else | |
| 326 | + this.fire('filters-controllet_filters', {filters: []}); | |
| 327 | + }, | |
| 328 | + | |
| 329 | + _addFilter : function() { | |
| 330 | + if (this.$.filter_field.selectedItem && this.$.filter_operation_menu.selectedItem && this.$.filter_value.value != "" && !this.$.filter_value.invalid) { | |
| 331 | + var field = this.$.filter_field.value; | |
| 332 | + var id = this.$.filter_operation.selectedItem.id; | |
| 333 | + var operation = this.operations[id]; | |
| 334 | +// var operation = this.$.filter_operation.value; | |
| 335 | + var value = this.$.filter_value.value; | |
| 336 | + | |
| 337 | +// var filters = this.filters; | |
| 338 | +// filters.push({"field": field, "operation": operation, "value": value}); | |
| 339 | +// this.filters = filters; | |
| 340 | + | |
| 341 | + this.filters.push({"field": field, "operation": operation, "value": value}); | |
| 342 | + | |
| 343 | + this.$.filter_field_menu.select(-1); | |
| 344 | + this.$.filter_operation_menu.select(-1); | |
| 345 | + this.$.filter_value.value = ""; | |
| 346 | + | |
| 347 | + this._fire(); | |
| 348 | + | |
| 349 | + this._renderFilters(); | |
| 350 | + } | |
| 351 | + }, | |
| 352 | + | |
| 353 | + _deleteFilter : function(e) { | |
| 354 | + var index = e.model.index; | |
| 355 | + | |
| 356 | +// var filters = this.filters; | |
| 357 | +// filters.splice(index, 1); | |
| 358 | +// this.filters = this._copy(filters); | |
| 359 | + | |
| 360 | + this.filters.splice(index, 1); | |
| 361 | + | |
| 362 | + this._fire(); | |
| 363 | + | |
| 364 | + this._renderFilters(); | |
| 365 | + }, | |
| 366 | + | |
| 367 | + _getOperationlName: function(operation) { | |
| 368 | + return ln[operation + "_" + ln["localization"]]; | |
| 369 | +// if(operation.indexOf("not") > -1) | |
| 370 | +// return ln["notContains_" + ln["localization"]]; | |
| 371 | +// if(operation.indexOf("contains") > -1) | |
| 372 | +// return ln["contains_" + ln["localization"]]; | |
| 373 | +// if(operation.indexOf("start") > -1) | |
| 374 | +// return ln["start_" + ln["localization"]]; | |
| 375 | +// if(operation.indexOf("ends") > -1) | |
| 376 | +// return ln["ends_" + ln["localization"]]; | |
| 377 | +// return operation; | |
| 378 | + }, | |
| 379 | + | |
| 380 | +// _changeLogicalOperator : function() { | |
| 381 | +// if(this.logicalOperator == "AND") | |
| 382 | +// this.logicalOperator = "OR"; | |
| 383 | +// else | |
| 384 | +// this.logicalOperator = "AND"; | |
| 385 | +// | |
| 386 | +// this._fire(); | |
| 387 | +// | |
| 388 | +// this._renderFilters(); | |
| 389 | +// }, | |
| 390 | + | |
| 391 | + _changeLogicalOperator : function() { | |
| 392 | + if(this.logicalOperator == "AND") | |
| 393 | + this.logicalOperator = "OR"; | |
| 394 | + else | |
| 395 | + this.logicalOperator = "AND"; | |
| 396 | + | |
| 397 | + this.filters[0] = {logicalOperator: this.logicalOperator} | |
| 398 | + | |
| 399 | + this._fire(); | |
| 400 | + | |
| 401 | + this._renderFilters(); | |
| 402 | + }, | |
| 403 | + | |
| 404 | + _renderFilters : function() { | |
| 405 | + var filters = this.filters.slice(); | |
| 406 | + this.filters = []; | |
| 407 | + this.async(function() { | |
| 408 | + this.filters = filters; | |
| 409 | + }, 0); | |
| 410 | + }, | |
| 411 | + | |
| 412 | + _getLogicalOperator : function(index) { | |
| 413 | + if(index == this.filters.length -1) | |
| 414 | + return ""; | |
| 415 | + else | |
| 416 | + return this.filters[0].logicalOperator; | |
| 417 | + }, | |
| 418 | + | |
| 419 | + _copy : function(o) { | |
| 420 | + var out, v, key; | |
| 421 | + out = Array.isArray(o) ? [] : {}; | |
| 422 | + for (key in o) { | |
| 423 | + v = o[key]; | |
| 424 | + out[key] = (typeof v === "object") ? this._copy(v) : v; | |
| 425 | + } | |
| 426 | + return out; | |
| 427 | + } | |
| 428 | + | |
| 429 | + }); | |
| 430 | + | |
| 431 | + </script> | |
| 432 | + | |
| 433 | +</dom-module> | |
| 0 | 434 | \ No newline at end of file | ... | ... |
controllets/items-vslider-controllet/demo/index.html
| ... | ... | @@ -8,12 +8,19 @@ |
| 8 | 8 | <script src="../../shared_js/perfect-scrollbar/js/min/perfect-scrollbar.jquery.min.js"></script> |
| 9 | 9 | <link rel="stylesheet" href="../../shared_js/perfect-scrollbar/css/perfect-scrollbar.min.css"> |
| 10 | 10 | |
| 11 | + <script src="../../../locales/controllet_ln.js"></script> | |
| 12 | + | |
| 11 | 13 | <link rel="import" href="../items-vslider-controllet.html" /> |
| 12 | 14 | </head> |
| 13 | 15 | |
| 14 | 16 | <body> |
| 15 | 17 | |
| 16 | -<items-vslider-controllet datalets-list-url="http://172.16.15.89/DEEalerProvider/DEEP/datalets-list"></items-vslider-controllet> | |
| 18 | +<items-vslider-controllet id="ivs" datalets-list-url="http://172.16.15.38/DEEalerProvider/DEEP/datalets-list"></items-vslider-controllet> | |
| 19 | + | |
| 20 | +<script> | |
| 21 | + var ivs = document.getElementById('ivs'); | |
| 22 | + ivs.setEnabledDatalets(["TEXT", "TEXT"]); | |
| 23 | +</script> | |
| 17 | 24 | |
| 18 | 25 | </body> |
| 19 | 26 | ... | ... |
controllets/items-vslider-controllet/items-vslider-controllet.html
| ... | ... | @@ -10,13 +10,15 @@ |
| 10 | 10 | |
| 11 | 11 | <link rel="import" href="../../bower_components/paper-input/paper-input.html"> |
| 12 | 12 | |
| 13 | +<script type="text/javascript" src="../../bower_components/jsdatachecker/jsdatachecker.min.js"></script> | |
| 14 | + | |
| 13 | 15 | <dom-module id="items-vslider-controllet"> |
| 14 | 16 | |
| 15 | 17 | <template> |
| 16 | 18 | |
| 17 | 19 | <style is="custom-style"> |
| 18 | 20 | paper-icon-button{ |
| 19 | - color: #FFFFFF; | |
| 21 | + /*color: #FFFFFF;*/ | |
| 20 | 22 | height: 32px;/*48*/ |
| 21 | 23 | width: 32px;/*48*/ |
| 22 | 24 | padding: 0px; |
| ... | ... | @@ -58,6 +60,20 @@ |
| 58 | 60 | background-color: #FFFFFF; |
| 59 | 61 | } |
| 60 | 62 | |
| 63 | + .content-card-disabled{ | |
| 64 | + position: relative; | |
| 65 | + float: left;/*firefox*/ | |
| 66 | + margin : 16px 16px 0px 16px; | |
| 67 | + padding: 8px; | |
| 68 | + height: 124px; | |
| 69 | + width: 124px; | |
| 70 | + cursor: pointer; | |
| 71 | + background-color: #FFFFFF; | |
| 72 | + | |
| 73 | + opacity: 0.5; | |
| 74 | + pointer-events:none; | |
| 75 | + } | |
| 76 | + | |
| 61 | 77 | img{ |
| 62 | 78 | width: 100%; |
| 63 | 79 | } |
| ... | ... | @@ -70,7 +86,8 @@ |
| 70 | 86 | width: 124px; |
| 71 | 87 | color: #000000; |
| 72 | 88 | background-color: rgba(158, 158, 158, 0.8);/*9E*/ |
| 73 | - /*background-color: rgba(182, 182, 182, 0.9);/!*B&*!/*/ | |
| 89 | + /*background-color: #B6B6B6;*/ | |
| 90 | + /*opacity: 0.9;*/ | |
| 74 | 91 | z-index: 1; |
| 75 | 92 | font-family: 'Roboto', 'Helvetica Neue', Helvetica, Arial, sans-serif; |
| 76 | 93 | font-size: 16px; |
| ... | ... | @@ -79,10 +96,12 @@ |
| 79 | 96 | } |
| 80 | 97 | |
| 81 | 98 | .legend.selected { |
| 82 | - background-color: #2196F3; | |
| 83 | - /*background-color: rgba(33, 150, 243, 0.8);*/ | |
| 84 | 99 | color: #FFFFFF; |
| 100 | + background-color: #2196F3; | |
| 101 | + opacity: 0.9; | |
| 85 | 102 | |
| 103 | + /*background: black;*/ | |
| 104 | + /*color: #2196F3;*/ | |
| 86 | 105 | } |
| 87 | 106 | |
| 88 | 107 | #items_vslider_search{ |
| ... | ... | @@ -94,7 +113,7 @@ |
| 94 | 113 | } |
| 95 | 114 | |
| 96 | 115 | .search{ |
| 97 | - color: #FFFFFF | |
| 116 | + /*color: #FFFFFF*/ | |
| 98 | 117 | } |
| 99 | 118 | |
| 100 | 119 | .clear { |
| ... | ... | @@ -121,7 +140,7 @@ |
| 121 | 140 | |
| 122 | 141 | <div id="div_datalets_container" class="flex"> |
| 123 | 142 | <template is="dom-repeat" items="{{filteredDatalets}}"> |
| 124 | - <paper-material id={{item.imageName}} elevation="1" class='content-card' on-click="_selectDatalet"> | |
| 143 | + <paper-material id={{item.imageName}} elevation="1" class$="{{item.class}}" on-click="_selectDatalet"> | |
| 125 | 144 | <div class="legend">{{_getChartName(item.imageName)}}</div> |
| 126 | 145 | <div><img src={{item.imageUrl}}></div> |
| 127 | 146 | </paper-material> |
| ... | ... | @@ -174,6 +193,7 @@ |
| 174 | 193 | value : "", |
| 175 | 194 | observer : '_filterDatalets' |
| 176 | 195 | } |
| 196 | + | |
| 177 | 197 | }, |
| 178 | 198 | |
| 179 | 199 | listeners: { |
| ... | ... | @@ -185,15 +205,34 @@ |
| 185 | 205 | }, |
| 186 | 206 | |
| 187 | 207 | attached : function() { |
| 188 | -// if(this.preselectedDatalet){ | |
| 208 | +// if(this.preselectedDatalet) | |
| 189 | 209 | // this._preselectDatalet(); |
| 190 | -// this.preselectedDatalet = undefined; | |
| 191 | -// } | |
| 192 | 210 | |
| 193 | 211 | this._translate(); |
| 194 | 212 | }, |
| 195 | 213 | |
| 196 | - _reset : function() { | |
| 214 | +// _preselectDatalet : function(){ | |
| 215 | +// this.async(function() { | |
| 216 | +// var dataletCard = document.getElementById(this.preselectedDatalet); | |
| 217 | +// dataletCard.elevation = "5"; | |
| 218 | +// dataletCard.getElementsByClassName("legend")[0].className = dataletCard.getElementsByClassName("legend")[0].className + " selected"; | |
| 219 | +// this.selectedDatalet = this.preselectedDatalet; | |
| 220 | +// | |
| 221 | +// this.fire('items-vslider-controllet_selected-datalet', {datalet: this.selectedDatalet}); | |
| 222 | +// this.preselectedDatalet = undefined; | |
| 223 | +// }, 300); | |
| 224 | +// }, | |
| 225 | + | |
| 226 | + preselectDatalet : function(preselectedDatalet){ | |
| 227 | + var dataletCard = document.getElementById(preselectedDatalet); | |
| 228 | + dataletCard.elevation = "5"; | |
| 229 | + dataletCard.getElementsByClassName("legend")[0].className = dataletCard.getElementsByClassName("legend")[0].className + " selected"; | |
| 230 | + this.selectedDatalet = preselectedDatalet; | |
| 231 | + | |
| 232 | + this.fire('items-vslider-controllet_selected-datalet', {datalet: this.selectedDatalet}); | |
| 233 | + }, | |
| 234 | + | |
| 235 | + reset : function() { | |
| 197 | 236 | if(this.selectedDatalet != undefined && (document.getElementById(this.selectedDatalet) != null)){ |
| 198 | 237 | var dataletCard = document.getElementById(this.selectedDatalet); |
| 199 | 238 | dataletCard.elevation = "1"; |
| ... | ... | @@ -216,27 +255,85 @@ |
| 216 | 255 | _getDatalets : function(e){ |
| 217 | 256 | var datalets = new Array(); |
| 218 | 257 | for(var i=0; i < e.detail.response.length; i++){ |
| 219 | - var datalet = { imageName : e.detail.response[i].name.replace("-datalet", ""), imageUrl : e.detail.response[i].url + e.detail.response[i].name + ".png" }; | |
| 258 | + var datalet = { | |
| 259 | + imageName : e.detail.response[i].name.replace("-datalet", ""), | |
| 260 | + imageUrl : e.detail.response[i].url + e.detail.response[i].name + ".png", | |
| 261 | + inputTypes : this._getInputTypes(e.detail.response[i].idm.inputs.input), | |
| 262 | + class : "content-card" | |
| 263 | + }; | |
| 264 | + | |
| 220 | 265 | if(e.detail.response[i].type != "hidden") |
| 221 | 266 | datalets.push(datalet); |
| 222 | 267 | } |
| 223 | 268 | |
| 224 | 269 | this.datalets = datalets; |
| 225 | - this.filteredDatalets = datalets; | |
| 270 | + /**/this.filteredDatalets = datalets; | |
| 271 | + }, | |
| 272 | + | |
| 273 | + _getInputTypes : function(inputs){ | |
| 274 | + var inputTypes = []; | |
| 275 | + for(var i=0; i < inputs.length; i++) { | |
| 276 | + if(inputs[i].selection != "?" /*&& inputs[i].selection != "*"*/) | |
| 277 | + inputTypes.push(inputs[i].type); | |
| 278 | + } | |
| 279 | + return inputTypes; | |
| 280 | + }, | |
| 281 | + | |
| 282 | + setEnabledDatalets : function(fields){ | |
| 283 | + var dataTypes = []; | |
| 284 | + for(var i=0; i < fields.length; i++) | |
| 285 | + dataTypes.push(fields[i].type); | |
| 286 | + | |
| 287 | + this.async(function() { | |
| 288 | +// console.log(DataTypeHierarchy.canConvert("TEXT", "NUMBER")); | |
| 289 | +// console.log(DataTypeHierarchy.canConvert("NUMBER", "TEXT")); | |
| 290 | + | |
| 291 | + for(var i=0; i < this.datalets.length; i++) { | |
| 292 | + if(!this._enebled(this.datalets[i].inputTypes, dataTypes)) | |
| 293 | + this.datalets[i]["class"] = "content-card-disabled"; | |
| 294 | + else | |
| 295 | + this.datalets[i]["class"] = "content-card"; | |
| 296 | + } | |
| 297 | + | |
| 298 | + this._filterDatalets(); | |
| 299 | + }, 1);//remove async | |
| 300 | + }, | |
| 301 | + | |
| 302 | + _enebled : function(inputTypes, dataTypes){ | |
| 303 | + if((inputTypes.indexOf("NUMBER") > -1) && !(dataTypes.indexOf("NUMBER") > -1)) | |
| 304 | + return false; | |
| 305 | + return true; | |
| 226 | 306 | }, |
| 227 | 307 | |
| 308 | +// _enebled : function(dataTypes, inputTypes){ | |
| 309 | +// var enabled = true; | |
| 310 | +// for(var i=0; i < inputTypes.length; i++) { | |
| 311 | +// var canConvert = false; | |
| 312 | +// for(var j=0; j < dataTypes.length; j++) { | |
| 313 | +// if(DataTypeHierarchy.canConvert(dataTypes[j], inputTypes[i])) { | |
| 314 | +// canConvert = true; | |
| 315 | +// break; | |
| 316 | +// } | |
| 317 | +// } | |
| 318 | +// if(!canConvert) | |
| 319 | +// enabled = false; | |
| 320 | +// } | |
| 321 | +// return enabled; | |
| 322 | +// }, | |
| 323 | + | |
| 228 | 324 | _filterDatalets : function(){ |
| 229 | 325 | var datalets = new Array(); |
| 230 | 326 | for(var i=0; i < this.datalets.length; i++){ |
| 231 | 327 | var datalet = this.datalets[i]; |
| 232 | 328 | var imageName = this._getChartName(datalet.imageName).toLowerCase(); |
| 233 | -// console.log(imageName); | |
| 234 | -// console.log(this.filter); | |
| 235 | 329 | if(imageName.indexOf(this.filter.toLowerCase()) > -1) |
| 236 | 330 | datalets.push(datalet); |
| 237 | 331 | } |
| 238 | 332 | |
| 239 | - this.filteredDatalets = datalets; | |
| 333 | + this.filteredDatalets = []; | |
| 334 | + this.async(function() { | |
| 335 | + this.filteredDatalets = datalets; | |
| 336 | + }, 0); | |
| 240 | 337 | |
| 241 | 338 | $("#div_datalets_container").animate({ scrollTop: 0}, 0); |
| 242 | 339 | }, |
| ... | ... | @@ -278,32 +375,13 @@ |
| 278 | 375 | this.fire('items-vslider-controllet_selected-datalet', {datalet: this.selectedDatalet}); |
| 279 | 376 | }, |
| 280 | 377 | |
| 281 | - _preselectDatalet : function(){ | |
| 282 | -// this.async(function() { | |
| 283 | - var dataletCard = document.getElementById(this.preselectedDatalet); | |
| 284 | -// console.log(dataletCard); | |
| 285 | -// console.log(this.preselectedDatalet); | |
| 286 | -// var id = "#"+this.preselectedDatalet; | |
| 287 | -// var dataletCard = $(id); | |
| 288 | -// var dataletCard = this.$$("#datatable"); | |
| 289 | -// console.log(dataletCard); | |
| 290 | 378 | |
| 291 | - dataletCard.elevation = "5"; | |
| 292 | - dataletCard.getElementsByClassName("legend")[0].className = dataletCard.getElementsByClassName("legend")[0].className + " selected"; | |
| 293 | - | |
| 294 | -// dataletCard.find(".legend")[0].className += " selected"; | |
| 295 | - this.selectedDatalet = this.preselectedDatalet; | |
| 296 | - | |
| 297 | - this.fire('items-vslider-controllet_selected-datalet', {datalet: this.selectedDatalet}); | |
| 298 | -// }, 500); | |
| 299 | - }, | |
| 300 | 379 | |
| 301 | 380 | _getImageUrl : function(index){ |
| 302 | 381 | return this.datalets[index].imageUrl; |
| 303 | 382 | }, |
| 304 | 383 | |
| 305 | 384 | _onPrevClick : function() { |
| 306 | - | |
| 307 | 385 | var container = $("#div_datalets_container"); |
| 308 | 386 | var h = container.height(); |
| 309 | 387 | var dataletPerPage = parseInt(h/156); | ... | ... |
controllets/page-slider-controllet/page-slider-controllet.html
| ... | ... | @@ -8,6 +8,8 @@ |
| 8 | 8 | <link rel="import" href="../../bower_components/iron-icons/iron-icons.html"> |
| 9 | 9 | <link rel="import" href="../../bower_components/iron-icon/iron-icon.html"> |
| 10 | 10 | |
| 11 | +<link rel="import" href="../../bower_components/paper-tooltip/paper-tooltip.html"> | |
| 12 | + | |
| 11 | 13 | <dom-module id="page-slider-controllet"> |
| 12 | 14 | |
| 13 | 15 | <template> |
| ... | ... | @@ -30,6 +32,19 @@ |
| 30 | 32 | color: #B6B6B6; |
| 31 | 33 | } |
| 32 | 34 | |
| 35 | + paper-tooltip { | |
| 36 | + --paper-tooltip-background: black; | |
| 37 | + } | |
| 38 | + | |
| 39 | + paper-tooltip p { | |
| 40 | + font-family: 'Roboto', 'Helvetica Neue', Helvetica, Arial, sans-serif; | |
| 41 | + font-size: 16px; | |
| 42 | + line-height: 24px; | |
| 43 | + | |
| 44 | + margin: 0; | |
| 45 | + padding: 0; | |
| 46 | + } | |
| 47 | + | |
| 33 | 48 | .header{ |
| 34 | 49 | font-family: 'Roboto', 'Helvetica Neue', Helvetica, Arial, sans-serif; |
| 35 | 50 | width: 100%; |
| ... | ... | @@ -96,6 +111,9 @@ |
| 96 | 111 | </div> |
| 97 | 112 | </div> |
| 98 | 113 | |
| 114 | + <paper-tooltip for="slider_chevron_left" position="right" offset="0"><p><span id="back"></span></p></paper-tooltip> | |
| 115 | + <paper-tooltip for="slider_chevron_right" position="left" offset="-16"><p><span id="forward"></span></p></paper-tooltip> | |
| 116 | + | |
| 99 | 117 | <neon-animated-pages on-neon-animation-finish="_onNeonAnimationFinish" selected="[[selected]]" entry-animation="[[entryAnimation]]" exit-animation="[[exitAnimation]]"> |
| 100 | 118 | <content></content> |
| 101 | 119 | </neon-animated-pages> |
| ... | ... | @@ -160,8 +178,11 @@ |
| 160 | 178 | attached : function() { |
| 161 | 179 | this.fire('page-slider-controllet_selected', {selected : this.selected}); |
| 162 | 180 | |
| 163 | - this.$.slider_chevron_left.setAttribute("title", ln["back_" + ln["localization"]]); | |
| 164 | - this.$.slider_chevron_right.setAttribute("title", ln["forward_" + ln["localization"]]); | |
| 181 | +// this.$.slider_chevron_left.setAttribute("title", ln["back_" + ln["localization"]]); | |
| 182 | +// this.$.slider_chevron_right.setAttribute("title", ln["forward_" + ln["localization"]]); | |
| 183 | + | |
| 184 | + this.$.back.innerHTML = ln["back_" + ln["localization"]]; | |
| 185 | + this.$.forward.innerHTML = ln["forward_" + ln["localization"]]; | |
| 165 | 186 | }, |
| 166 | 187 | |
| 167 | 188 | setTitle : function(title, subtitle) { | ... | ... |
controllets/select-data-controllet/select-data-controllet.html
| ... | ... | @@ -2,7 +2,7 @@ |
| 2 | 2 | |
| 3 | 3 | <link rel="import" href="../select-fields-controllet/select-fields-controllet.html" /> |
| 4 | 4 | <link rel="import" href="../data-table-controllet/data-table-controllet.html" /> |
| 5 | -<link rel="import" href="../filters-controllet/filters-controllet.html" /> | |
| 5 | +<link rel="import" href="../expert-query-controllet/expert-query-controllet.html" /> | |
| 6 | 6 | |
| 7 | 7 | <link rel="import" href="../providers-utility-controllet/providers-utility-controllet.html" /> |
| 8 | 8 | |
| ... | ... | @@ -44,7 +44,7 @@ |
| 44 | 44 | width: 100%; |
| 45 | 45 | } |
| 46 | 46 | |
| 47 | - #select_data_controllet_container #filters_container { | |
| 47 | + #select_data_controllet_container #expert_container { | |
| 48 | 48 | height: 48px; |
| 49 | 49 | width: 100%; |
| 50 | 50 | margin-top: 24px; |
| ... | ... | @@ -64,8 +64,8 @@ |
| 64 | 64 | <div id="table_container"> |
| 65 | 65 | <data-table-controllet id="data_table"></data-table-controllet> |
| 66 | 66 | </div> |
| 67 | - <div id="filters_container"> | |
| 68 | - <filters-controllet id="filters"></filters-controllet> | |
| 67 | + <div id="expert_container"> | |
| 68 | + <expert-query-controllet id="expert"></expert-query-controllet> | |
| 69 | 69 | </div> |
| 70 | 70 | </div> |
| 71 | 71 | </div> |
| ... | ... | @@ -83,7 +83,6 @@ |
| 83 | 83 | dataUrl : { |
| 84 | 84 | type : String, |
| 85 | 85 | value : undefined |
| 86 | -// observer : '_init' | |
| 87 | 86 | }, |
| 88 | 87 | |
| 89 | 88 | data : { |
| ... | ... | @@ -96,6 +95,11 @@ |
| 96 | 95 | value : [] |
| 97 | 96 | }, |
| 98 | 97 | |
| 98 | + aggregators : { | |
| 99 | + type : Array, | |
| 100 | + value : [] | |
| 101 | + }, | |
| 102 | + | |
| 99 | 103 | selectedFields : { |
| 100 | 104 | type : Array, |
| 101 | 105 | value : [] |
| ... | ... | @@ -104,13 +108,13 @@ |
| 104 | 108 | }, |
| 105 | 109 | |
| 106 | 110 | listeners: { |
| 107 | - 'filters-controllet_show': '_resizeFilters', | |
| 111 | + 'expert-controllet_show': '_resizeExpertWindow', | |
| 108 | 112 | 'select-fields-controllet_selected-fields': '_updateFields', |
| 109 | - 'filters-controllet_filters': '_updateFilters' | |
| 113 | + 'filters-controllet_filters': '_updateFilters', | |
| 114 | + 'aggregators-controllet_aggregators': '_updateAggregators' | |
| 110 | 115 | }, |
| 111 | 116 | |
| 112 | 117 | ready : function() { |
| 113 | - this.showFilter = false; | |
| 114 | 118 | }, |
| 115 | 119 | |
| 116 | 120 | attached : function(){ |
| ... | ... | @@ -119,23 +123,47 @@ |
| 119 | 123 | window.addEventListener("resize", function() { that._resize(); }); |
| 120 | 124 | }, |
| 121 | 125 | |
| 126 | + getFields : function() { | |
| 127 | + if(this.aggregators && this.aggregators.length) { | |
| 128 | + var selectedFields = []; | |
| 129 | + for (var i = 0; i < this.aggregators.length; i++) { | |
| 130 | + if(this.aggregators[i]["operation"] == "GROUP BY") | |
| 131 | + selectedFields.push(this.aggregators[i]["field"]); | |
| 132 | + else | |
| 133 | + selectedFields.push(this.aggregators[i]["operation"] + "(" + this.aggregators[i]["field"] + ")"); | |
| 134 | + } | |
| 135 | + return selectedFields; | |
| 136 | + } | |
| 137 | + return this.selectedFields; | |
| 138 | + }, | |
| 139 | + | |
| 122 | 140 | getSelectedFields : function() { |
| 123 | - return utility_getSelectedFields(this.fields, this.selectedFields);; | |
| 141 | + return this.selectedFields; | |
| 124 | 142 | }, |
| 125 | 143 | |
| 126 | 144 | getFilters : function() { |
| 127 | 145 | return this.filters; |
| 128 | 146 | }, |
| 129 | 147 | |
| 148 | + getAggregators : function() { | |
| 149 | + return this.aggregators; | |
| 150 | + }, | |
| 151 | + | |
| 130 | 152 | getData : function() { |
| 131 | - //return datatable.getData | |
| 132 | - //this.fields = "*" | |
| 133 | - var data = alasql_QUERY(this.data, this.fields, this.filters, null, null); | |
| 134 | 153 | var converter = new DataTypeConverter(); |
| 154 | + | |
| 155 | + var data = alasql_QUERY(this.data, this.selectedFields, this.filters, null, null); | |
| 135 | 156 | var result = converter.inferJsonDataType(data, ["*"]); |
| 136 | 157 | result = converter.cast(result); |
| 137 | 158 | data = result.dataset; |
| 138 | 159 | |
| 160 | + if(this.aggregators && this.aggregators.length) { | |
| 161 | + data = alasql_QUERY(data, this.selectedFields, null, this.aggregators, null); | |
| 162 | + result = converter.inferJsonDataType(data, ["*"]); | |
| 163 | + result = converter.cast(result); | |
| 164 | + data = result.dataset; | |
| 165 | + } | |
| 166 | + | |
| 139 | 167 | return data; |
| 140 | 168 | }, |
| 141 | 169 | |
| ... | ... | @@ -147,38 +175,42 @@ |
| 147 | 175 | }, |
| 148 | 176 | |
| 149 | 177 | setFilters : function(filters) { |
| 150 | - this.async(function() { | |
| 151 | - this.$.filters.setFilters(filters); | |
| 152 | - }, 0); | |
| 178 | + this.$.expert.setFilters(filters); | |
| 153 | 179 | }, |
| 154 | 180 | |
| 155 | - _resizeFilters : function() { | |
| 156 | - if(!this.showFilter) { | |
| 181 | + setAggregators : function(aggregators) { | |
| 182 | + this.$.expert.setAggregators(aggregators); | |
| 183 | + }, | |
| 184 | + | |
| 185 | + _resizeExpertWindow : function(e) { | |
| 186 | + if(e.detail.show) { | |
| 157 | 187 | this.$.table_container.style.height = "calc(50% - 12px)"; |
| 158 | - this.$.filters_container.style.height = "calc(50% - 12px)"; | |
| 188 | + this.$.expert_container.style.height = "calc(50% - 12px)"; | |
| 159 | 189 | } |
| 160 | 190 | else { |
| 161 | 191 | this.$.table_container.style.height = "calc(100% - 72px)"; |
| 162 | - this.$.filters_container.style.height = "48px"; | |
| 192 | + this.$.expert_container.style.height = "48px"; | |
| 163 | 193 | } |
| 164 | 194 | |
| 165 | 195 | this.$.data_table._resize(); |
| 166 | - | |
| 167 | - this.showFilter = !this.showFilter; | |
| 168 | 196 | }, |
| 169 | 197 | |
| 170 | 198 | _updateFields : function(e) { |
| 171 | - this.selectedFields = e.detail.selectedFields; | |
| 172 | - var fields = utility_getSelectedFields(this.fields, this.selectedFields); | |
| 173 | - var data = alasql_QUERY(this.data, fields, this.filters, null, null); | |
| 174 | - this.$.data_table.setData(data); | |
| 199 | + var selectedFields = e.detail.selectedFields; | |
| 200 | + this.selectedFields = utility_getSelectedFields(this.fields, selectedFields); | |
| 201 | + this.$.data_table.setData(this.getData()); | |
| 202 | + | |
| 203 | + this.$.expert.setSelectedFields(this.selectedFields); | |
| 175 | 204 | }, |
| 176 | 205 | |
| 177 | 206 | _updateFilters : function(e) { |
| 178 | 207 | this.filters = e.detail.filters; |
| 179 | - var fields = utility_getSelectedFields(this.fields, this.selectedFields); | |
| 180 | - var data = alasql_QUERY(this.data, fields, this.filters, null, null); | |
| 181 | - this.$.data_table.setData(data); | |
| 208 | + this.$.data_table.setData(this.getData()); | |
| 209 | + }, | |
| 210 | + | |
| 211 | + _updateAggregators : function(e) { | |
| 212 | + this.aggregators = e.detail.aggregators; | |
| 213 | + this.$.data_table.setData(this.getData()); | |
| 182 | 214 | }, |
| 183 | 215 | |
| 184 | 216 | init : function() { |
| ... | ... | @@ -204,7 +236,8 @@ |
| 204 | 236 | that.data = alasql_QUERY(data, that.fields, null, null, null); |
| 205 | 237 | |
| 206 | 238 | that.$.select_fields.setFields(that.fields); |
| 207 | - that.$.filters.setFields(that.fields); | |
| 239 | + that.$.expert.setFields(that.fields); | |
| 240 | +// that.$.expert.setSelectedFields(that.selectedFields); | |
| 208 | 241 | |
| 209 | 242 | that.fire('data-ready', {ready : true}); |
| 210 | 243 | }, |
| ... | ... | @@ -225,16 +258,18 @@ |
| 225 | 258 | this.data = alasql_QUERY(data, this.fields, null, null, null); |
| 226 | 259 | |
| 227 | 260 | this.$.select_fields.setFields(this.fields); |
| 228 | - this.$.filters.setFields(this.fields); | |
| 261 | + this.$.expert.setFields(this.fields); | |
| 262 | +// this.$.expert.setSelectedFields(this.selectedFields); | |
| 229 | 263 | } |
| 230 | 264 | }, |
| 231 | 265 | |
| 232 | 266 | reset : function() { |
| 233 | 267 | this.filters = []; |
| 268 | + this.aggregators = []; | |
| 234 | 269 | this.selectedFields = []; |
| 235 | 270 | this.$.select_fields.reset(); |
| 236 | 271 | this.$.data_table.reset(); |
| 237 | - this.$.filters.reset(); | |
| 272 | + this.$.expert.reset(); | |
| 238 | 273 | }, |
| 239 | 274 | |
| 240 | 275 | _resize : function(){ | ... | ... |
controllets/select-data-controllet/select-data-controllet_old.html
0 โ 100755
| 1 | +<link rel="import" href="../../bower_components/polymer/polymer.html" /> | |
| 2 | + | |
| 3 | +<link rel="import" href="../select-fields-controllet/select-fields-controllet.html" /> | |
| 4 | +<link rel="import" href="../data-table-controllet/data-table-controllet.html" /> | |
| 5 | +<link rel="import" href="../filters-controllet/filters-controllet.html" /> | |
| 6 | + | |
| 7 | +<link rel="import" href="../providers-utility-controllet/providers-utility-controllet.html" /> | |
| 8 | + | |
| 9 | +<script type="text/javascript" src="../../alasql-utility/alasql.min.js"></script> | |
| 10 | +<script type="text/javascript" src="../../alasql-utility/alasql-utility.js"></script> | |
| 11 | + | |
| 12 | +<script type="text/javascript" src="../../bower_components/jsdatachecker/jsdatachecker.min.js"></script> | |
| 13 | + | |
| 14 | +<dom-module id="select-data-controllet"> | |
| 15 | + | |
| 16 | + <style is="custom-style"> | |
| 17 | + | |
| 18 | + #select_data_controllet_container { | |
| 19 | + display: flex; | |
| 20 | + flex-direction: row; | |
| 21 | + margin-top: 8px; | |
| 22 | + } | |
| 23 | + | |
| 24 | + #select_data_controllet_container * { | |
| 25 | + font-family: 'Roboto', 'Helvetica Neue', Helvetica, Arial, sans-serif; | |
| 26 | + font-size: 16px; | |
| 27 | + line-height: 24px; | |
| 28 | + } | |
| 29 | + | |
| 30 | + #select_data_controllet_container #fields_container { | |
| 31 | + height: 100%; | |
| 32 | + width: 20%; | |
| 33 | + min-width: 192px; | |
| 34 | + } | |
| 35 | + | |
| 36 | + #select_data_controllet_container #right_container { | |
| 37 | + height: 100%; | |
| 38 | + width: calc(80% - 24px); | |
| 39 | + margin-left: 24px; | |
| 40 | + } | |
| 41 | + | |
| 42 | + #select_data_controllet_container #table_container { | |
| 43 | + height: calc(100% - 72px); | |
| 44 | + width: 100%; | |
| 45 | + } | |
| 46 | + | |
| 47 | + #select_data_controllet_container #filters_container { | |
| 48 | + height: 48px; | |
| 49 | + width: 100%; | |
| 50 | + margin-top: 24px; | |
| 51 | + } | |
| 52 | + | |
| 53 | + </style> | |
| 54 | + | |
| 55 | + <template> | |
| 56 | + | |
| 57 | + <providers-utility-controllet></providers-utility-controllet> | |
| 58 | + | |
| 59 | + <div id="select_data_controllet_container"> | |
| 60 | + <div id="fields_container"> | |
| 61 | + <select-fields-controllet id="select_fields"></select-fields-controllet> | |
| 62 | + </div> | |
| 63 | + <div id="right_container"> | |
| 64 | + <div id="table_container"> | |
| 65 | + <data-table-controllet id="data_table"></data-table-controllet> | |
| 66 | + </div> | |
| 67 | + <div id="filters_container"> | |
| 68 | + <filters-controllet id="filters"></filters-controllet> | |
| 69 | + </div> | |
| 70 | + </div> | |
| 71 | + </div> | |
| 72 | + | |
| 73 | + | |
| 74 | + </template> | |
| 75 | + | |
| 76 | + <script> | |
| 77 | + Polymer({ | |
| 78 | + | |
| 79 | + is : 'select-data-controllet', | |
| 80 | + | |
| 81 | + properties : { | |
| 82 | + | |
| 83 | + dataUrl : { | |
| 84 | + type : String, | |
| 85 | + value : undefined | |
| 86 | +// observer : '_init' | |
| 87 | + }, | |
| 88 | + | |
| 89 | + data : { | |
| 90 | + type : Object, | |
| 91 | + value : undefined | |
| 92 | + }, | |
| 93 | + | |
| 94 | + filters : { | |
| 95 | + type : Array, | |
| 96 | + value : [] | |
| 97 | + }, | |
| 98 | + | |
| 99 | + selectedFields : { | |
| 100 | + type : Array, | |
| 101 | + value : [] | |
| 102 | + } | |
| 103 | + | |
| 104 | + }, | |
| 105 | + | |
| 106 | + listeners: { | |
| 107 | + 'filters-controllet_show': '_resizeFilters', | |
| 108 | + 'select-fields-controllet_selected-fields': '_updateFields', | |
| 109 | + 'filters-controllet_filters': '_updateFilters' | |
| 110 | + }, | |
| 111 | + | |
| 112 | + ready : function() { | |
| 113 | + this.showFilter = false; | |
| 114 | + }, | |
| 115 | + | |
| 116 | + attached : function(){ | |
| 117 | + this._resize(); | |
| 118 | + var that = this; | |
| 119 | + window.addEventListener("resize", function() { that._resize(); }); | |
| 120 | + }, | |
| 121 | + | |
| 122 | + getSelectedFields : function() { | |
| 123 | + return utility_getSelectedFields(this.fields, this.selectedFields);; | |
| 124 | + }, | |
| 125 | + | |
| 126 | + getFilters : function() { | |
| 127 | + return this.filters; | |
| 128 | + }, | |
| 129 | + | |
| 130 | + getData : function() { | |
| 131 | + //return datatable.getData | |
| 132 | + //this.fields = "*" | |
| 133 | + var data = alasql_QUERY(this.data, this.fields, this.filters, null, null); | |
| 134 | + var converter = new DataTypeConverter(); | |
| 135 | + var result = converter.inferJsonDataType(data, ["*"]); | |
| 136 | + result = converter.cast(result); | |
| 137 | + data = result.dataset; | |
| 138 | + | |
| 139 | + return data; | |
| 140 | + }, | |
| 141 | + | |
| 142 | + setSelectedFields : function(selectedFields) { | |
| 143 | + this.async(function() { | |
| 144 | + var selectedIndices = utility_getSelectedIndices(this.fields, selectedFields); | |
| 145 | + this.$.select_fields.setSelectFields(selectedIndices); | |
| 146 | + }, 0); | |
| 147 | + }, | |
| 148 | + | |
| 149 | + setFilters : function(filters) { | |
| 150 | + this.async(function() { | |
| 151 | + this.$.filters.setFilters(filters); | |
| 152 | + }, 0); | |
| 153 | + }, | |
| 154 | + | |
| 155 | + _resizeFilters : function() { | |
| 156 | + if(!this.showFilter) { | |
| 157 | + this.$.table_container.style.height = "calc(50% - 12px)"; | |
| 158 | + this.$.filters_container.style.height = "calc(50% - 12px)"; | |
| 159 | + } | |
| 160 | + else { | |
| 161 | + this.$.table_container.style.height = "calc(100% - 72px)"; | |
| 162 | + this.$.filters_container.style.height = "48px"; | |
| 163 | + } | |
| 164 | + | |
| 165 | + this.$.data_table._resize(); | |
| 166 | + | |
| 167 | + this.showFilter = !this.showFilter; | |
| 168 | + }, | |
| 169 | + | |
| 170 | + _updateFields : function(e) { | |
| 171 | + this.selectedFields = e.detail.selectedFields; | |
| 172 | + var fields = utility_getSelectedFields(this.fields, this.selectedFields); | |
| 173 | + var data = alasql_QUERY(this.data, fields, this.filters, null, null); | |
| 174 | + this.$.data_table.setData(data); | |
| 175 | + }, | |
| 176 | + | |
| 177 | + _updateFilters : function(e) { | |
| 178 | + this.filters = e.detail.filters; | |
| 179 | + var fields = utility_getSelectedFields(this.fields, this.selectedFields); | |
| 180 | + var data = alasql_QUERY(this.data, fields, this.filters, null, null); | |
| 181 | + this.$.data_table.setData(data); | |
| 182 | + }, | |
| 183 | + | |
| 184 | + init : function() { | |
| 185 | + if(this.dataUrl) { | |
| 186 | + | |
| 187 | + var that = this; | |
| 188 | + | |
| 189 | + $.ajax({ | |
| 190 | + url: this.dataUrl, | |
| 191 | + dataType: "json", | |
| 192 | + success: function(data){ | |
| 193 | + that.reset(); | |
| 194 | + | |
| 195 | + var f = Object.create(providerFactory); | |
| 196 | + var provider = f.getProvider(that.dataUrl); | |
| 197 | + data = provider.selectData(data); | |
| 198 | + | |
| 199 | + var converter = new DataTypeConverter(); | |
| 200 | + var result = converter.inferJsonDataType(data, ["*"]); | |
| 201 | + result = converter.cast(result); | |
| 202 | + that.fields = utility_getFields(result.types); | |
| 203 | + data = result.dataset; | |
| 204 | + that.data = alasql_QUERY(data, that.fields, null, null, null); | |
| 205 | + | |
| 206 | + that.$.select_fields.setFields(that.fields); | |
| 207 | + that.$.filters.setFields(that.fields); | |
| 208 | + | |
| 209 | + that.fire('data-ready', {ready : true}); | |
| 210 | + }, | |
| 211 | + error: function(){ | |
| 212 | + that.fire('data-ready', {ready : false}); | |
| 213 | + } | |
| 214 | + }); | |
| 215 | + } | |
| 216 | + | |
| 217 | + else { | |
| 218 | + this.reset(); | |
| 219 | + | |
| 220 | + var converter = new DataTypeConverter(); | |
| 221 | + var result = converter.inferJsonDataType(this.data, ["*"]); | |
| 222 | + result = converter.cast(result); | |
| 223 | + this.fields = utility_getFields(result.types); | |
| 224 | + data = result.dataset; | |
| 225 | + this.data = alasql_QUERY(data, this.fields, null, null, null); | |
| 226 | + | |
| 227 | + this.$.select_fields.setFields(this.fields); | |
| 228 | + this.$.filters.setFields(this.fields); | |
| 229 | + } | |
| 230 | + }, | |
| 231 | + | |
| 232 | + reset : function() { | |
| 233 | + this.filters = []; | |
| 234 | + this.selectedFields = []; | |
| 235 | + this.$.select_fields.reset(); | |
| 236 | + this.$.data_table.reset(); | |
| 237 | + this.$.filters.reset(); | |
| 238 | + }, | |
| 239 | + | |
| 240 | + _resize : function(){ | |
| 241 | + var h = Math.max(document.documentElement.clientHeight, window.innerHeight || 0) - 16; | |
| 242 | + h = h - 64 - 8; //height with page scroller + margin-top | |
| 243 | + $("#select_data_controllet_container").height(h); | |
| 244 | + } | |
| 245 | + | |
| 246 | + }); | |
| 247 | + | |
| 248 | + </script> | |
| 249 | + | |
| 250 | +</dom-module> | |
| 0 | 251 | \ No newline at end of file | ... | ... |
controllets/select-fields-controllet/select-fields-controllet.html
| ... | ... | @@ -28,6 +28,10 @@ |
| 28 | 28 | cursor: pointer; |
| 29 | 29 | } |
| 30 | 30 | |
| 31 | + #select_fields_controllet_container #header:hover { | |
| 32 | + color: #2196F3; | |
| 33 | + } | |
| 34 | + | |
| 31 | 35 | #select_fields_controllet_container #menu_container { |
| 32 | 36 | position: relative; |
| 33 | 37 | height: calc(100% - 48px); |
| ... | ... | @@ -42,6 +46,14 @@ |
| 42 | 46 | cursor: pointer; |
| 43 | 47 | color: #000000; |
| 44 | 48 | margin: 4px; |
| 49 | + padding: 0px 12px; | |
| 50 | + } | |
| 51 | + | |
| 52 | + paper-item span { | |
| 53 | + width: 100%; | |
| 54 | + overflow: hidden; | |
| 55 | + white-space: nowrap; | |
| 56 | + text-overflow: ellipsis; | |
| 45 | 57 | } |
| 46 | 58 | |
| 47 | 59 | paper-item.iron-selected { |
| ... | ... | @@ -73,7 +85,7 @@ |
| 73 | 85 | <div id="menu_container"> |
| 74 | 86 | <paper-menu id="menu" multi> |
| 75 | 87 | <template is="dom-repeat" items="{{fields}}"> |
| 76 | - <paper-item>{{item}}</paper-item> | |
| 88 | + <paper-item title="{{item}}"><span>{{item}}</span></paper-item> | |
| 77 | 89 | </template> |
| 78 | 90 | </paper-menu> |
| 79 | 91 | </div> |
| ... | ... | @@ -92,12 +104,8 @@ |
| 92 | 104 | fields : { |
| 93 | 105 | type : Array, |
| 94 | 106 | value : [] |
| 95 | - }, | |
| 107 | + } | |
| 96 | 108 | |
| 97 | -// preselectedFields : { | |
| 98 | -// type : Array, | |
| 99 | -// value : [] | |
| 100 | -// } | |
| 101 | 109 | }, |
| 102 | 110 | |
| 103 | 111 | listeners: { |
| ... | ... | @@ -110,13 +118,13 @@ |
| 110 | 118 | |
| 111 | 119 | attached : function() { |
| 112 | 120 | this._translate(); |
| 113 | - | |
| 114 | -// if (this.preselectedFields.length > 0) | |
| 115 | -// this._preselectFields(); | |
| 116 | 121 | }, |
| 117 | 122 | |
| 118 | 123 | setFields : function(fields) { |
| 119 | - this.fields = fields; | |
| 124 | + var index = fields.indexOf("_id"); | |
| 125 | + if(index > -1) | |
| 126 | + fields.splice(index, 1);//providers_utility _copy | |
| 127 | + this.fields = fields.sort(); | |
| 120 | 128 | }, |
| 121 | 129 | |
| 122 | 130 | setSelectFields : function(selectFields) { |
| ... | ... | @@ -134,12 +142,6 @@ |
| 134 | 142 | this.$.fields.innerHTML = ln["fields_" + ln["localization"]]; |
| 135 | 143 | }, |
| 136 | 144 | |
| 137 | -// _preselectFields : function() { | |
| 138 | -// for(var i=0; i<this.preselectedFields.length; i++) | |
| 139 | -// this.$.menu.select(this.preselectedFields[i]); | |
| 140 | -// this._fireSelectedFields(); | |
| 141 | -// }, | |
| 142 | - | |
| 143 | 145 | _fireSelectedFields : function() { |
| 144 | 146 | this.debounce('_fireSelectedFields', function () { |
| 145 | 147 | this.fire('select-fields-controllet_selected-fields', {selectedFields: this.$.menu.selectedValues}); | ... | ... |
controllets/select-inputs-controllet/demo/index.html
0 โ 100644
| 1 | +<!DOCTYPE html> | |
| 2 | +<html lang="en"> | |
| 3 | +<head> | |
| 4 | + <meta charset="UTF-8"> | |
| 5 | + <title></title> | |
| 6 | +</head> | |
| 7 | +<body> | |
| 8 | + | |
| 9 | +</body> | |
| 10 | +</html> | |
| 11 | + | |
| 12 | +// value : [{field: "x", type: "NUMBER"}, {field: "cat", type: "TEXT"}, {field: "testo", type: "TEXT"}, {field: "y", type: "NUMBER"}, {field: "testo", type: "TEXT"}, {field: "testo", type: "TEXT"}] | |
| 0 | 13 | \ No newline at end of file | ... | ... |
controllets/select-inputs-controllet/select-inputs-controllet.html
0 โ 100644
| 1 | +<link rel="import" href="../../bower_components/polymer/polymer.html" /> | |
| 2 | + | |
| 3 | +<link rel="import" href="../../bower_components/paper-material/paper-material.html" /> | |
| 4 | + | |
| 5 | +<link rel="import" href="../../bower_components/paper-tabs/paper-tabs.html"> | |
| 6 | +<link rel="import" href="../../bower_components/paper-tabs/paper-tab.html"> | |
| 7 | + | |
| 8 | +<link rel="import" href="../../bower_components/neon-animation/neon-animation.html"> | |
| 9 | +<link rel="import" href="../../bower_components/neon-animation/neon-animatable.html"> | |
| 10 | +<link rel="import" href="../../bower_components/neon-animation/neon-animations.html"> | |
| 11 | + | |
| 12 | +<link rel="import" href="../../bower_components/paper-dropdown-menu/paper-dropdown-menu.html"> | |
| 13 | +<link rel="import" href="../../bower_components/paper-menu/paper-menu.html"> | |
| 14 | +<link rel="import" href="../../bower_components/paper-item/paper-item.html"> | |
| 15 | + | |
| 16 | +<link rel="import" href="../../bower_components/paper-icon-button/paper-icon-button.html"> | |
| 17 | +<link rel="import" href="../../bower_components/iron-icons/iron-icons.html"> | |
| 18 | +<link rel="import" href="../../bower_components/iron-icon/iron-icon.html"> | |
| 19 | + | |
| 20 | +<link rel="import" href="../../bower_components/paper-tooltip/paper-tooltip.html"> | |
| 21 | + | |
| 22 | +<dom-module id="select-inputs-controllet"> | |
| 23 | + | |
| 24 | + <template> | |
| 25 | + | |
| 26 | + <style is="custom-style"> | |
| 27 | + :host { | |
| 28 | + --paper-dropdown-menu-icon: { | |
| 29 | + color: #2196F3; | |
| 30 | + }; | |
| 31 | + } | |
| 32 | + | |
| 33 | + #inputs_container { | |
| 34 | + height: 100%; | |
| 35 | + width: 100%; | |
| 36 | + } | |
| 37 | + | |
| 38 | + #inputs_container * { | |
| 39 | + font-family: 'Roboto', 'Helvetica Neue', Helvetica, Arial, sans-serif; | |
| 40 | + font-size: 16px; | |
| 41 | + line-height: 24px; | |
| 42 | + } | |
| 43 | + | |
| 44 | + #inputs_container #neon_container { | |
| 45 | + height: calc(100% - 48px - 120px - 48px); | |
| 46 | + width: 100%; | |
| 47 | + } | |
| 48 | + | |
| 49 | + #inputs_container #inputs_list, #inputs_container #options_list { | |
| 50 | + position: relative; | |
| 51 | + height: 100%; | |
| 52 | + width: 100%; | |
| 53 | + } | |
| 54 | + | |
| 55 | + #inputs_container .header { | |
| 56 | + height: 24px; | |
| 57 | + padding: 12px; | |
| 58 | + text-align: center; | |
| 59 | + font-weight: 700; | |
| 60 | + background-color: #B6B6B6; | |
| 61 | + } | |
| 62 | + | |
| 63 | + #inputs_container .inputs{ | |
| 64 | + display: flex; | |
| 65 | + } | |
| 66 | + | |
| 67 | + #inputs_container br { | |
| 68 | + display: block; | |
| 69 | + margin-top: 8px; | |
| 70 | + content: " "; | |
| 71 | + } | |
| 72 | + | |
| 73 | + #inputs_container p { | |
| 74 | + margin: 0; | |
| 75 | + padding: 0; | |
| 76 | + } | |
| 77 | + | |
| 78 | + #inputs_container p .title{ | |
| 79 | + font-weight: 700; | |
| 80 | + color: #2196F3; | |
| 81 | + } | |
| 82 | + | |
| 83 | + #inputs_container p .description{ | |
| 84 | + } | |
| 85 | + | |
| 86 | + #inputs_container .info_button { | |
| 87 | + height: 40px; | |
| 88 | + width: 40px; | |
| 89 | + padding: 10px; | |
| 90 | + } | |
| 91 | + | |
| 92 | + #inputs_container .order_button { | |
| 93 | + height: 40px; | |
| 94 | + width: 40px; | |
| 95 | + padding: 10px 0 10px 10px; | |
| 96 | + } | |
| 97 | + | |
| 98 | + #inputs_container #base_description_info { | |
| 99 | + margin-top: -4px; | |
| 100 | + } | |
| 101 | + | |
| 102 | + paper-tabs { | |
| 103 | + background: #B6B6B6; | |
| 104 | + --paper-tabs-selection-bar-color: #2196F3; | |
| 105 | + } | |
| 106 | + | |
| 107 | + paper-tab { | |
| 108 | + --paper-tab-ink: #2196F3; | |
| 109 | + } | |
| 110 | + | |
| 111 | + paper-tab.iron-selected { | |
| 112 | + font-weight: 700; | |
| 113 | + } | |
| 114 | + | |
| 115 | + paper-tab:hover { | |
| 116 | + color: #2196F3; | |
| 117 | + } | |
| 118 | + | |
| 119 | + paper-input { | |
| 120 | + width: calc(100% - 24px - 48px); | |
| 121 | + margin-left: 12px; | |
| 122 | + --paper-input-container-focus-color: #2196F3; | |
| 123 | + } | |
| 124 | + | |
| 125 | + paper-input#description{ | |
| 126 | + margin-top: -4px; | |
| 127 | + } | |
| 128 | + | |
| 129 | + #inputs_list paper-dropdown-menu { | |
| 130 | + width: calc(100% - 24px - 48px - 50px); | |
| 131 | + margin-left: 12px; | |
| 132 | + --paper-input-container-focus-color: #2196F3; | |
| 133 | + } | |
| 134 | + | |
| 135 | + #options_list paper-dropdown-menu { | |
| 136 | + width: calc(100% - 24px - 48px); | |
| 137 | + margin-left: 12px; | |
| 138 | + --paper-input-container-focus-color: #2196F3; | |
| 139 | + } | |
| 140 | + | |
| 141 | + paper-item { | |
| 142 | + min-width: 128px; | |
| 143 | + white-space: nowrap; | |
| 144 | + } | |
| 145 | + | |
| 146 | + paper-item.iron-selected { | |
| 147 | + background-color: #2196F3; | |
| 148 | + color: #FFFFFF; | |
| 149 | + } | |
| 150 | + | |
| 151 | + paper-icon-button { | |
| 152 | + height: 40px; | |
| 153 | + width: 40px; | |
| 154 | + padding: 4px; | |
| 155 | + color: #2196F3; | |
| 156 | + --paper-icon-button-ink-color: #2196F3; | |
| 157 | + } | |
| 158 | + | |
| 159 | + paper-icon-button[icon="info-outline"] { | |
| 160 | + cursor: help; | |
| 161 | + } | |
| 162 | + | |
| 163 | + paper-tooltip { | |
| 164 | + min-width: 400px; | |
| 165 | + --paper-tooltip-background: black; | |
| 166 | + } | |
| 167 | + | |
| 168 | + </style> | |
| 169 | + | |
| 170 | + <paper-material id="inputs_container" elevation="5"> | |
| 171 | + | |
| 172 | + <div class="header"><span id="baseInfo"></span></div> | |
| 173 | + | |
| 174 | + <div class="inputs"> | |
| 175 | + <paper-input id="title" maxlength="32" on-change="_addOption"></paper-input> | |
| 176 | + <div class="info_button"> | |
| 177 | + <paper-icon-button id="base_title_info" icon="info-outline" noink></paper-icon-button> | |
| 178 | + </div> | |
| 179 | + <paper-tooltip for="base_title_info" position="right" offset="22"> | |
| 180 | + <p> | |
| 181 | + <span class="title">{{_getInputName('TITLE')}}</span> | |
| 182 | + <br> | |
| 183 | + <span class="description">{{_getInputDescription('TITLE')}}</span> | |
| 184 | + </p> | |
| 185 | + </paper-tooltip> | |
| 186 | + </div> | |
| 187 | + | |
| 188 | + <div class="inputs"> | |
| 189 | + <paper-input id="description" maxlength="128" on-change="_addOption"></paper-input> | |
| 190 | + <div class="info_button"> | |
| 191 | + <paper-icon-button id="base_description_info" icon="info-outline" noink></paper-icon-button> | |
| 192 | + </div> | |
| 193 | + <paper-tooltip for="base_description_info" position="right" offset="22"> | |
| 194 | + <p> | |
| 195 | + <span class="title">{{_getInputName('DESCRIPTION')}}</span> | |
| 196 | + <br> | |
| 197 | + <span class="description">{{_getInputDescription('DESCRIPTION')}}</span> | |
| 198 | + </p> | |
| 199 | + </paper-tooltip> | |
| 200 | + </div> | |
| 201 | + | |
| 202 | + <paper-tabs selected="{{tabIndex}}"> | |
| 203 | + <paper-tab><span id="inputsTab"></span></paper-tab> | |
| 204 | + <paper-tab><span id="optionsTab"></span></paper-tab> | |
| 205 | + </paper-tabs> | |
| 206 | + | |
| 207 | + <neon-animated-pages id="neon_container" selected="{{_getNeonIndex(tabIndex)}}" entry-animation="fade-in-animation" exit-animation="fade-out-animation"> | |
| 208 | + | |
| 209 | + <neon-animatable> | |
| 210 | + | |
| 211 | + <div id="inputs_list"> | |
| 212 | + <template is="dom-repeat" items="{{inputs}}" index-as="input_index"> | |
| 213 | + <div class="inputs"> | |
| 214 | + <paper-dropdown-menu id="{{input_index}}" label="{{_getInputRichName(item)}}"> | |
| 215 | + <paper-menu class="dropdown-content"> | |
| 216 | + <paper-item on-tap="_removeInput"></paper-item> | |
| 217 | + <template is="dom-repeat" items={{_getFieldsByType(item.type)}}> | |
| 218 | + <paper-item id="{{index}}" on-tap="_addInput">{{item.name}}</paper-item> | |
| 219 | + </template> | |
| 220 | + </paper-menu> | |
| 221 | + </paper-dropdown-menu> | |
| 222 | + <div class="order_button"> | |
| 223 | + <paper-icon-button id="{{input_index}}" icon="unfold-more" on-click="_addOrder" disabled></paper-icon-button> | |
| 224 | + </div> | |
| 225 | + <div class="info_button"> | |
| 226 | + <paper-icon-button id="info_input_{{input_index}}" icon="info-outline" noink></paper-icon-button> | |
| 227 | + </div> | |
| 228 | + </div> | |
| 229 | + </template> | |
| 230 | + </div> | |
| 231 | + | |
| 232 | + <template is="dom-repeat" items="{{inputs}}"> | |
| 233 | + <paper-tooltip for="{{_getInputInfoId(index)}}" position="right" offset="22"> | |
| 234 | + <p> | |
| 235 | + <span class="title">{{_getInputRichName(item)}}</span> | |
| 236 | + <br> | |
| 237 | + <span class="description">{{_getInputDescription(item.name)}}</span> | |
| 238 | + </p> | |
| 239 | + </paper-tooltip> | |
| 240 | + </template> | |
| 241 | + | |
| 242 | + </neon-animatable> | |
| 243 | + | |
| 244 | + <neon-animatable> | |
| 245 | + | |
| 246 | + <div id="options_list"> | |
| 247 | + <template is="dom-repeat" items={{options}} index-as="option_index"> | |
| 248 | + <div class="inputs"> | |
| 249 | + <template is="dom-if" if="{{_checkType(item.type, 'TEXT')}}"> | |
| 250 | + <paper-input id="{{item.name}}" label={{_getInputName(item.name)}} on-change="_addOption"></paper-input> | |
| 251 | + </template> | |
| 252 | + | |
| 253 | + <template is="dom-if" if="{{_checkType(item.type, 'LIST')}}"> | |
| 254 | + <paper-dropdown-menu id="{{option_index}}" label={{_getInputName(item.name)}}> | |
| 255 | + <paper-menu class="dropdown-content" selected="0"> | |
| 256 | + <template is="dom-repeat" items={{item.list.item}}> | |
| 257 | + <paper-item id="{{item}}" on-tap="_addOption">{{_getInputName(item)}}</paper-item> | |
| 258 | + </template> | |
| 259 | + </paper-menu> | |
| 260 | + </paper-dropdown-menu> | |
| 261 | + </template> | |
| 262 | + | |
| 263 | + <div class="info_button"> | |
| 264 | + <paper-icon-button id="info_option_{{option_index}}" icon="info-outline" noink></paper-icon-button> | |
| 265 | + </div> | |
| 266 | + </div> | |
| 267 | + </template> | |
| 268 | + </div> | |
| 269 | + | |
| 270 | + <template is="dom-repeat" items="{{options}}"> | |
| 271 | + <paper-tooltip for="{{_getOptionInfoId(index)}}" position="right" offset="22"> | |
| 272 | + <p> | |
| 273 | + <span class="title">{{_getInputName(item.name)}}</span> | |
| 274 | + <br> | |
| 275 | + <span class="description">{{_getInputDescription(item.name)}}</span> | |
| 276 | + </p> | |
| 277 | + </paper-tooltip> | |
| 278 | + </template> | |
| 279 | + | |
| 280 | + </neon-animatable> | |
| 281 | + | |
| 282 | + </neon-animated-pages> | |
| 283 | + | |
| 284 | + </paper-material> | |
| 285 | + | |
| 286 | + | |
| 287 | + </template> | |
| 288 | + | |
| 289 | + <script> | |
| 290 | + | |
| 291 | + Polymer({ | |
| 292 | + | |
| 293 | + is : 'select-inputs-controllet', | |
| 294 | + | |
| 295 | + properties : { | |
| 296 | + | |
| 297 | + tabIndex: { | |
| 298 | + type: Number, | |
| 299 | + value: 0 | |
| 300 | + }, | |
| 301 | + | |
| 302 | + inputs : { | |
| 303 | + type : Array, | |
| 304 | + value : [] | |
| 305 | + }, | |
| 306 | + | |
| 307 | + options : { | |
| 308 | + type : Array, | |
| 309 | + value : [] | |
| 310 | + }, | |
| 311 | + | |
| 312 | + selectedInputs : { | |
| 313 | + type : Array, | |
| 314 | + value : [] | |
| 315 | + }, | |
| 316 | + | |
| 317 | + selectedOptions : { | |
| 318 | + type : Array, | |
| 319 | + value : [] | |
| 320 | + }, | |
| 321 | + | |
| 322 | + orders : { | |
| 323 | + type : Array, | |
| 324 | + value : [] | |
| 325 | + }, | |
| 326 | + | |
| 327 | + fields : { | |
| 328 | + type : Array, | |
| 329 | + value : [] | |
| 330 | + } | |
| 331 | + | |
| 332 | + }, | |
| 333 | + | |
| 334 | + ready : function() { | |
| 335 | + $(this.$.inputs_list).perfectScrollbar(); | |
| 336 | + $(this.$.options_list).perfectScrollbar(); | |
| 337 | + }, | |
| 338 | + | |
| 339 | + attached : function() { | |
| 340 | + this._translate(); | |
| 341 | + }, | |
| 342 | + | |
| 343 | + getSelectedInputs : function () { | |
| 344 | + return this.selectedInputs; | |
| 345 | + }, | |
| 346 | + | |
| 347 | + getSelectedOptions : function () { | |
| 348 | + return this.selectedOptions; | |
| 349 | + }, | |
| 350 | + | |
| 351 | + getOrders : function () { | |
| 352 | + return this.orders; | |
| 353 | + }, | |
| 354 | + | |
| 355 | + setFields : function(fields) { | |
| 356 | + this.fields = this._copy(fields); | |
| 357 | + }, | |
| 358 | + | |
| 359 | + setInputs : function(idm) { | |
| 360 | + var inputs = this._copy(idm.inputs.input); | |
| 361 | + var options = []; | |
| 362 | + if(idm.inputs.layouts) | |
| 363 | + options = this._copy(idm.inputs.layouts.input); | |
| 364 | + | |
| 365 | + if(!(inputs instanceof Array)) | |
| 366 | + inputs = [inputs]; | |
| 367 | + | |
| 368 | + if(!(options instanceof Array)) | |
| 369 | + options = [options]; | |
| 370 | + | |
| 371 | + var mandatory = 0; | |
| 372 | + var multi = -1; | |
| 373 | + var opt = 0; | |
| 374 | + for (var i = 0; i < inputs.length; i++){ | |
| 375 | + switch(inputs[i].selection) { | |
| 376 | + case "*": | |
| 377 | + multi = i; | |
| 378 | + break; | |
| 379 | + case "?": | |
| 380 | + opt++; | |
| 381 | + break; | |
| 382 | + default: | |
| 383 | + mandatory++; | |
| 384 | + } | |
| 385 | + } | |
| 386 | + if(multi > -1) { | |
| 387 | + var input = inputs[multi]; | |
| 388 | + for (var i = 0; i < this.fields.length - mandatory - 1; i++) | |
| 389 | + inputs.splice(multi, 0, input); | |
| 390 | + } | |
| 391 | + | |
| 392 | + this.tabIndex = -1; | |
| 393 | + this._reset(); | |
| 394 | + | |
| 395 | + this.async(function () { | |
| 396 | + this.inputs = inputs; | |
| 397 | + this.options = options; | |
| 398 | + }, 0); | |
| 399 | + | |
| 400 | + this.selectedInputs = new Array(inputs.length).fill(null); | |
| 401 | + for (var i = 0; i < options.length; i++) { | |
| 402 | + if(options[i].type != "LIST") | |
| 403 | + this.selectedOptions[options[i].name] = ""; | |
| 404 | + else | |
| 405 | + this.selectedOptions[options[i].name] = options[i].list.item[0]; | |
| 406 | + } | |
| 407 | + }, | |
| 408 | + | |
| 409 | + _translate : function(){ | |
| 410 | + this.$.baseInfo.innerHTML = ln["baseInfo_" + ln["localization"]]; | |
| 411 | + this.$.inputsTab.innerHTML = ln["inputs_" + ln["localization"]]; | |
| 412 | + this.$.optionsTab.innerHTML = ln["options_" + ln["localization"]]; | |
| 413 | + | |
| 414 | + this.$.title.label = ln["title_" + ln["localization"]]; | |
| 415 | + this.$.description.label = ln["description_" + ln["localization"]]; | |
| 416 | + }, | |
| 417 | + | |
| 418 | + _preselectInputs : function(dataletPreset) { | |
| 419 | + this.selectedInputs = JSON.parse(dataletPreset.selectedfields); | |
| 420 | + var ddls = this.$.inputs_list.querySelectorAll("paper-dropdown-menu"); | |
| 421 | + | |
| 422 | + for (var i = 0; i < ddls.length; i++) | |
| 423 | + if(this.selectedInputs[i]) { | |
| 424 | + $(ddls[i]).find("paper-menu")[0].select(this.selectedInputs[i].index); | |
| 425 | + var icon = this.$.inputs_list.querySelectorAll("paper-icon-button")[ddls[i].id * 2]; | |
| 426 | + icon.setAttribute("icon", "unfold-more"); //wrong | |
| 427 | + icon.removeAttribute("disabled"); | |
| 428 | + } | |
| 429 | + | |
| 430 | + this.orders = JSON.parse(dataletPreset.orders); | |
| 431 | + | |
| 432 | + var selectedOptions = []; | |
| 433 | + var inputs = this.$.options_list.querySelectorAll("paper-input"); | |
| 434 | + | |
| 435 | + for (var i = 0; i < inputs.length; i++) { | |
| 436 | + if (dataletPreset[this.options[i].name]) { | |
| 437 | + inputs[i].value = dataletPreset[this.options[i].name]; | |
| 438 | + selectedOptions[this.options[i].name] = dataletPreset[this.options[i].name]; | |
| 439 | + } | |
| 440 | + } | |
| 441 | + if(dataletPreset["title"]) { | |
| 442 | + this.$.title.value = dataletPreset["title"]; | |
| 443 | + selectedOptions["title"] = dataletPreset["title"]; | |
| 444 | + } | |
| 445 | + if(dataletPreset["description"]) { | |
| 446 | + this.$.description.value = dataletPreset["description"]; | |
| 447 | + selectedOptions["description"] = dataletPreset["description"]; | |
| 448 | + } | |
| 449 | + | |
| 450 | + this.selectedOptions = this._copy(selectedOptions); | |
| 451 | + | |
| 452 | + this._fire(); | |
| 453 | + }, | |
| 454 | + | |
| 455 | + _reset : function() { | |
| 456 | + this.tabIndex = 0; | |
| 457 | + this.inputs = []; | |
| 458 | + this.options = []; | |
| 459 | + this.selectedInputs = []; | |
| 460 | + this.selectedOptions = []; | |
| 461 | + this.orders = []; | |
| 462 | + }, | |
| 463 | + | |
| 464 | + _addInput : function(e) { | |
| 465 | + var inputIndex = $(e.target).parents("paper-dropdown-menu")[0].id; | |
| 466 | + var fields = this._getFieldsByType(this.inputs[inputIndex].type); | |
| 467 | + var fieldIndex = e.target.id; | |
| 468 | + this.selectedInputs[inputIndex] = {field: this.inputs[inputIndex].name, value : fields[fieldIndex].name, index : parseInt(fieldIndex) + 1}; | |
| 469 | + | |
| 470 | + var icon = this.$.inputs_list.querySelectorAll("paper-icon-button")[inputIndex * 2]; | |
| 471 | + //this.orders = this.orders.filter(function (el) { return el.field !== field???; }); | |
| 472 | + icon.setAttribute("icon", "unfold-more"); | |
| 473 | + icon.removeAttribute("disabled"); | |
| 474 | + | |
| 475 | + this._fire(); | |
| 476 | + }, | |
| 477 | + | |
| 478 | + _removeInput : function(e) { | |
| 479 | + var inputIndex = $(e.target).parents("paper-dropdown-menu")[0].id; | |
| 480 | + this.selectedInputs[inputIndex] = null; | |
| 481 | + | |
| 482 | + var icon = this.$.inputs_list.querySelectorAll("paper-icon-button")[inputIndex * 2]; | |
| 483 | + //this.orders = this.orders.filter(function (el) { return el.field !== field???; }); | |
| 484 | + icon.setAttribute("icon", "unfold-more"); | |
| 485 | + icon.setAttribute("disabled", true); | |
| 486 | + | |
| 487 | + this._fire(); | |
| 488 | + }, | |
| 489 | + | |
| 490 | + _addOrder : function(e) { | |
| 491 | + var t = e.target; | |
| 492 | + if(t.tagName.indexOf("IRON-ICON") > -1) | |
| 493 | + t = $(e.target).parents("paper-icon-button")[0]; | |
| 494 | + | |
| 495 | + var icon = t.getAttribute("icon"); | |
| 496 | + var id = t.getAttribute("id"); | |
| 497 | + var field = this.selectedInputs[id].value; | |
| 498 | + | |
| 499 | + this.orders = this.orders.filter(function (el) { return el.field !== field; }); | |
| 500 | + | |
| 501 | + if(icon.indexOf("unfold-more") > -1){ | |
| 502 | + t.setAttribute("icon", "expand-less"); | |
| 503 | + this.orders.unshift({"field": field, "operation": "ASC"}); | |
| 504 | + } | |
| 505 | + else if(icon.indexOf("expand-less") > -1){ | |
| 506 | + t.setAttribute("icon", "expand-more"); | |
| 507 | + this.orders.unshift({"field": field, "operation": "DESC"}); | |
| 508 | + } | |
| 509 | + else if(icon.indexOf("expand-more") > -1){ | |
| 510 | + t.setAttribute("icon", "unfold-more"); | |
| 511 | + } | |
| 512 | + | |
| 513 | + this._fire(); | |
| 514 | + }, | |
| 515 | + | |
| 516 | + _addOption : function(e) { | |
| 517 | + if(e.target.nodeName == "PAPER-ITEM") { | |
| 518 | + var optionIndex = $(e.target).parents("paper-dropdown-menu")[0].id; | |
| 519 | + this.selectedOptions[this.options[optionIndex].name] = e.target.id; | |
| 520 | + } | |
| 521 | + else if(e.target.nodeName == "INPUT") { | |
| 522 | + var option = $(e.target).parents("paper-input")[0].id; | |
| 523 | + this.selectedOptions[option] = e.target.value; | |
| 524 | + } | |
| 525 | + this._fire(); | |
| 526 | + }, | |
| 527 | + | |
| 528 | + _fire : function() { | |
| 529 | + if(this._isReady()) | |
| 530 | + this.fire('select-inputs_isReady', {isReady: true}); | |
| 531 | + else | |
| 532 | + this.fire('select-inputs_isReady', {isReady: false}); | |
| 533 | + }, | |
| 534 | + | |
| 535 | + _isReady : function() { | |
| 536 | + var fire = true; | |
| 537 | + for(var i = 0; i < this.inputs.length; i++) { | |
| 538 | + if(this.inputs[i].selection != "*" && this.inputs[i].selection != "?" && !this.selectedInputs[i]) | |
| 539 | + return false; | |
| 540 | + if(this.inputs[i].selection == "*") | |
| 541 | + fire = false; | |
| 542 | + } | |
| 543 | + | |
| 544 | + if(this.inputs[0].name == "Latitude" || this.inputs[0].name == "GEOJSON")//wrong | |
| 545 | + return true; | |
| 546 | + | |
| 547 | + if(!fire) | |
| 548 | + for(var i = 0; i < this.inputs.length; i++) | |
| 549 | + if(this.inputs[i].selection == "*" && this.selectedInputs[i]) | |
| 550 | + return true; | |
| 551 | + | |
| 552 | + return fire; | |
| 553 | + }, | |
| 554 | + | |
| 555 | + _getFieldsByType: function(type) { | |
| 556 | + if(type == "NUMBER") { | |
| 557 | + var fields = []; | |
| 558 | + for(var i = 0; i < this.fields.length; i++) | |
| 559 | + if(this.fields[i].type == type) | |
| 560 | + fields.push(this.fields[i]); | |
| 561 | + return fields; | |
| 562 | + } | |
| 563 | + | |
| 564 | + return this.fields; | |
| 565 | + }, | |
| 566 | + | |
| 567 | + _getInputRichName : function(item) { | |
| 568 | + var name = ln[item.name + "_" +ln["localization"]]; | |
| 569 | + if(item.type != "TEXT") | |
| 570 | + name += " [" + item.type + "]"; | |
| 571 | + if(item.selection == "?") | |
| 572 | + name += " [OPT]"; | |
| 573 | + return name; | |
| 574 | + }, | |
| 575 | + | |
| 576 | + _getInputName : function(name) { | |
| 577 | + return ln[name + "_" +ln["localization"]]; | |
| 578 | + }, | |
| 579 | + | |
| 580 | + _getInputDescription : function(name) { | |
| 581 | + return ln[name + "Description_" +ln["localization"]]; | |
| 582 | + }, | |
| 583 | + | |
| 584 | + _getInputInfoId : function(index) { | |
| 585 | + return "info_input_" + index; | |
| 586 | + }, | |
| 587 | + | |
| 588 | + _getOptionInfoId : function(index) { | |
| 589 | + return "info_option_" + index; | |
| 590 | + }, | |
| 591 | + | |
| 592 | + _checkType : function(type, check){ | |
| 593 | + return (type == check); | |
| 594 | + }, | |
| 595 | + | |
| 596 | + _getNeonIndex : function(tabIndex){ | |
| 597 | + if(tabIndex == -1) | |
| 598 | + return 0; | |
| 599 | + return tabIndex; | |
| 600 | + }, | |
| 601 | + | |
| 602 | + _copy : function(o) { | |
| 603 | + var out, v, key; | |
| 604 | + out = Array.isArray(o) ? new Array(o.length) : {}; | |
| 605 | + for (key in o) { | |
| 606 | + v = o[key]; | |
| 607 | + out[key] = (typeof v === "object") ? this._copy(v) : v; | |
| 608 | + } | |
| 609 | + return out; | |
| 610 | + } | |
| 611 | + | |
| 612 | + }); | |
| 613 | + | |
| 614 | + </script> | |
| 615 | + | |
| 616 | +</dom-module> | |
| 0 | 617 | \ No newline at end of file | ... | ... |
controllets/select-visualization-controllet/demo/index.html
| ... | ... | @@ -13,6 +13,8 @@ |
| 13 | 13 | <script type="text/javascript" src="../../../alasql-utility/alasql.min.js"></script> |
| 14 | 14 | <script type="text/javascript" src="../../../alasql-utility/alasql-utility.js"></script> |
| 15 | 15 | |
| 16 | + <script type="text/javascript" src="../../../bower_components/jsdatachecker/jsdatachecker.min.js"></script> | |
| 17 | + | |
| 16 | 18 | <script> |
| 17 | 19 | ln["localization"] = "en"; |
| 18 | 20 | </script> | ... | ... |
controllets/select-visualization-controllet/select-datalet-inputs.html
| ... | ... | @@ -317,6 +317,18 @@ |
| 317 | 317 | temp.push({name: name + " " +(i-1), description: description, selection: selection}); |
| 318 | 318 | } |
| 319 | 319 | |
| 320 | + else if (inputs.length == 3 && inputs[1].selection == "*") {// | |
| 321 | + name = inputs[1].name; | |
| 322 | + description = inputs[1].description; | |
| 323 | + selection = inputs[1].selection; | |
| 324 | + temp = [inputs[0]]; | |
| 325 | + temp.push({name: name + " 1", description: description, selection: selection}); | |
| 326 | + for (var i = 3; i < this.fields.length; i++) | |
| 327 | + temp.push({name: name + " " +(i-1), description: description, selection: selection}); | |
| 328 | + | |
| 329 | + temp.push(inputs[2]); | |
| 330 | + } | |
| 331 | + | |
| 320 | 332 | this.inputs = this._copy(temp); |
| 321 | 333 | |
| 322 | 334 | this.selectedFields = new Array(temp.length); | ... | ... |
controllets/select-visualization-controllet/select-visualization-controllet.html
| ... | ... | @@ -5,9 +5,10 @@ |
| 5 | 5 | <link rel="import" href="../../bower_components/paper-button/paper-button.html"> |
| 6 | 6 | |
| 7 | 7 | <link rel="import" href="../items-vslider-controllet/items-vslider-controllet.html" /> |
| 8 | -<link rel="import" href="select-datalet-inputs_series.html" /> | |
| 9 | -<link rel="import" href="select-datalet-inputs.html" /> | |
| 10 | -<link rel="import" href="select-datalet-options.html" /> | |
| 8 | +<link rel="import" href="../select-inputs-controllet/select-inputs-controllet.html" /> | |
| 9 | +<link rel="import" href="../datalet-preview-controllet/datalet-preview-controllet.html" /> | |
| 10 | + | |
| 11 | +<script type="text/javascript" src="../../bower_components/jsdatachecker/jsdatachecker.min.js"></script> | |
| 11 | 12 | |
| 12 | 13 | <script src="../../../DEEPCLIENT/js/deepClient.js"></script> |
| 13 | 14 | |
| ... | ... | @@ -18,63 +19,61 @@ |
| 18 | 19 | <style is="custom-style"> |
| 19 | 20 | #select_visualization_container { |
| 20 | 21 | display: flex; |
| 21 | - font-family: 'Roboto', 'Helvetica Neue', Helvetica, Arial, sans-serif; | |
| 22 | - font-size: 16px; | |
| 23 | 22 | margin-top: 8px; |
| 24 | 23 | } |
| 25 | 24 | |
| 26 | - #items_vslider_controllet { | |
| 27 | - position: relative; | |
| 28 | - min-width: 172px; | |
| 25 | + #select_visualization_container * { | |
| 26 | + font-family: 'Roboto', 'Helvetica Neue', Helvetica, Arial, sans-serif; | |
| 27 | + font-size: 16px; | |
| 28 | + line-height: 24px; | |
| 29 | 29 | } |
| 30 | 30 | |
| 31 | - #datalet_selection_inputs { | |
| 31 | + #items_vslider_container { | |
| 32 | 32 | position: relative; |
| 33 | - margin-left: 32px; | |
| 34 | - min-width: 258px; | |
| 33 | + width: 172px; | |
| 35 | 34 | } |
| 36 | 35 | |
| 37 | - #datalet_selection_options { | |
| 36 | + #select_inputs_container { | |
| 38 | 37 | position: relative; |
| 39 | - margin-left: 32px; | |
| 38 | + width: calc(50% - 12px - 172px - 24px); | |
| 40 | 39 | min-width: 258px; |
| 40 | + margin-left: 24px; | |
| 41 | 41 | } |
| 42 | 42 | |
| 43 | 43 | #datalet_preview_container { |
| 44 | 44 | position: relative; |
| 45 | - width: 100%; | |
| 46 | - margin-left: 32px; | |
| 47 | - } | |
| 48 | - | |
| 49 | - #datalet_selection_datalet { | |
| 50 | - position: relative; | |
| 51 | - height: 100vh; | |
| 52 | - width: 100%; | |
| 45 | + width: calc(50% - 12px); | |
| 46 | + margin-left: 24px; | |
| 53 | 47 | } |
| 54 | 48 | |
| 55 | - #datalet_selection_datalet_placeholder { | |
| 56 | - padding: 16px; | |
| 57 | - } | |
| 49 | + /*#datalet_placeholder {*/ | |
| 50 | + /*width: calc(100% - 32px);*/ | |
| 51 | + /*height: calc(100% - 48px - 32px);*/ | |
| 52 | + /*padding: 16px;*/ | |
| 53 | + /*}*/ | |
| 58 | 54 | |
| 59 | - .input_header { | |
| 60 | - height: 32px; | |
| 61 | - padding-top: 16px; | |
| 62 | - text-align: center; | |
| 63 | - font-weight: 700; | |
| 64 | - background-color: #B6B6B6; | |
| 65 | - } | |
| 55 | + /*.header {*/ | |
| 56 | + /*height: 24px;*/ | |
| 57 | + /*padding: 12px;*/ | |
| 58 | + /*text-align: center;*/ | |
| 59 | + /*font-weight: 700;*/ | |
| 60 | + /*background-color: #B6B6B6;*/ | |
| 61 | + /*}*/ | |
| 66 | 62 | |
| 67 | 63 | paper-button { |
| 68 | 64 | position: absolute; |
| 69 | - bottom: 16px; | |
| 70 | - right: 11px; | |
| 71 | - | |
| 72 | 65 | height: 48px; |
| 73 | 66 | width: 172px; |
| 74 | - background-color: #00BCD4; | |
| 75 | - color: white; | |
| 67 | + padding: 12px; | |
| 68 | + background: #00BCD4; | |
| 69 | + color: #FFFFFF; | |
| 76 | 70 | font-weight: 700; |
| 77 | - padding: 16px; | |
| 71 | + | |
| 72 | + /*bottom: 16px;*/ | |
| 73 | + /*right: 11px;*/ | |
| 74 | + top: -56px; | |
| 75 | + right: 0; | |
| 76 | + margin: 0 16px; | |
| 78 | 77 | } |
| 79 | 78 | |
| 80 | 79 | paper-button:hover { |
| ... | ... | @@ -94,36 +93,26 @@ |
| 94 | 93 | |
| 95 | 94 | <div id="select_visualization_container"> |
| 96 | 95 | |
| 97 | - <div id="items_vslider_controllet"> | |
| 98 | - <items-vslider-controllet id="vslider" datalets-list-url={{dataletsListUrl}} preselected-datalet={{preselectedDatalet}}></items-vslider-controllet> | |
| 96 | + <div id="items_vslider_container"> | |
| 97 | + <items-vslider-controllet id="vslider" datalets-list-url="{{dataletsListUrl}}"></items-vslider-controllet> | |
| 99 | 98 | </div> |
| 100 | 99 | |
| 101 | - <div id="datalet_selection_inputs"> | |
| 102 | - <template is="dom-if" if="{{_checkType(type, 'multiseries')}}"> | |
| 103 | - <select-datalet-inputs_series id="inputs_series"></select-datalet-inputs_series> | |
| 104 | - </template> | |
| 105 | - <template is="dom-if" if="{{_checkType(type, 'default')}}"> | |
| 106 | - <select-datalet-inputs id="inputs"></select-datalet-inputs> | |
| 107 | - </template> | |
| 108 | - <template is="dom-if" if="{{_checkType(type, '')}}"> | |
| 109 | - <select-datalet-inputs></select-datalet-inputs> | |
| 110 | - </template> | |
| 100 | + <div id="select_inputs_container"> | |
| 101 | + <select-inputs-controllet id="inputs"></select-inputs-controllet> | |
| 111 | 102 | </div> |
| 112 | 103 | |
| 113 | - <div id="datalet_selection_options"> | |
| 114 | - <select-datalet-options id="options"></select-datalet-options> | |
| 104 | + <div id="datalet_preview_container"> | |
| 105 | + <datalet-preview-controllet id="preview" deep-url="{{deepUrl}}" datalets-list-url="{{dataletsListUrl}}"></datalet-preview-controllet> | |
| 115 | 106 | </div> |
| 116 | 107 | |
| 117 | - <div id="datalet_preview_container"> | |
| 108 | + <paper-button id="add_button" disabled raised on-click="_addDatalet"></paper-button> | |
| 118 | 109 | |
| 119 | - <paper-material id="datalet_selection_datalet" elevation="5"> | |
| 120 | - <div class="input_header"><span id="dataletPreview"></span></div> | |
| 121 | - <div id="datalet_selection_datalet_placeholder"></div> | |
| 122 | - </paper-material> | |
| 110 | + <!--<paper-material id="datalet_preview_container" elevation="5">--> | |
| 111 | + <!--<div class="header"><span id="dataletPreview"></span></div>--> | |
| 123 | 112 | |
| 124 | - <paper-button id="add_button" disabled raised on-click="_addDatalet"></paper-button> | |
| 113 | + <!--<div id="datalet_placeholder"></div>--> | |
| 125 | 114 | |
| 126 | - </div> | |
| 115 | + <!--</paper-material>--> | |
| 127 | 116 | |
| 128 | 117 | </div> |
| 129 | 118 | |
| ... | ... | @@ -147,72 +136,64 @@ |
| 147 | 136 | value : undefined |
| 148 | 137 | }, |
| 149 | 138 | |
| 150 | - selectedDatalet : { | |
| 139 | + dataUrl : { | |
| 151 | 140 | type : String, |
| 152 | 141 | value : undefined |
| 153 | 142 | }, |
| 154 | 143 | |
| 155 | - preselectedDatalet : { | |
| 156 | - type : String, | |
| 144 | + data : { | |
| 145 | + type : Object, | |
| 157 | 146 | value : undefined |
| 158 | 147 | }, |
| 159 | 148 | |
| 160 | - type : { | |
| 161 | - type : String, | |
| 162 | - value : "" | |
| 163 | - }, | |
| 164 | - | |
| 165 | - filters : { | |
| 149 | + selectedFields : { | |
| 166 | 150 | type : Array, |
| 167 | 151 | value : [] |
| 168 | 152 | }, |
| 169 | 153 | |
| 170 | - fields : { | |
| 154 | + filters : { | |
| 171 | 155 | type : Array, |
| 172 | 156 | value : [] |
| 173 | 157 | }, |
| 174 | 158 | |
| 175 | - selectedFields : { | |
| 159 | + aggregators : { | |
| 176 | 160 | type : Array, |
| 177 | 161 | value : [] |
| 178 | 162 | }, |
| 179 | 163 | |
| 180 | - dataletPreset : { | |
| 181 | - type : Object, | |
| 182 | - value : [] | |
| 183 | - }, | |
| 164 | +// orders : { | |
| 165 | +// type : Array, | |
| 166 | +// value : [] | |
| 167 | +// }, | |
| 184 | 168 | |
| 185 | - dataUrl : { | |
| 169 | + selectedDatalet : { | |
| 186 | 170 | type : String, |
| 187 | 171 | value : undefined |
| 188 | 172 | }, |
| 189 | 173 | |
| 190 | - params:{ | |
| 191 | - type: Object, | |
| 192 | - value: undefined | |
| 174 | + dataletType : { | |
| 175 | + type : String, | |
| 176 | + value : undefined | |
| 193 | 177 | }, |
| 194 | 178 | |
| 195 | - data : { | |
| 196 | - type : Object, | |
| 179 | + preselectedDatalet : { | |
| 180 | + type : String, | |
| 197 | 181 | value : undefined |
| 198 | 182 | }, |
| 199 | 183 | |
| 184 | + dataletPreset : { | |
| 185 | + type : Object, | |
| 186 | + value : [] | |
| 187 | + } | |
| 188 | + | |
| 200 | 189 | }, |
| 201 | 190 | |
| 202 | 191 | listeners: { |
| 203 | -// 'select-fields-controllet_selected-fields': '_updateFields', | |
| 204 | -// 'filters-controllet_filters': '_updateFilters', | |
| 205 | 192 | 'items-vslider-controllet_selected-datalet': '_selectDatalet', |
| 206 | - 'select_visualization_inputs_ready': '_loadDatalet', | |
| 207 | - 'select_visualization_options_changed': '_tryLoadDatalet' | |
| 193 | + 'select-inputs_isReady': '_loadDatalet' | |
| 208 | 194 | }, |
| 209 | 195 | |
| 210 | 196 | ready : function() { |
| 211 | - this._resize(); | |
| 212 | - | |
| 213 | - $(this.$.datalet_selection_datalet).perfectScrollbar(); | |
| 214 | - | |
| 215 | -// this.params = {'data-url' : this.dataUrl};//not here | |
| 216 | 197 | }, |
| 217 | 198 | |
| 218 | 199 | attached : function() { |
| ... | ... | @@ -227,34 +208,31 @@ |
| 227 | 208 | this.filters = this._copy(filters); |
| 228 | 209 | }, |
| 229 | 210 | |
| 230 | - setFields : function(fields) { | |
| 231 | -// if (this.fields.length > 0 && JSON.stringify(this.fields) != JSON.stringify(fields)) | |
| 232 | -// this.init(); | |
| 211 | + setAggregators : function(aggregators) { | |
| 212 | + this.aggregators = this._copy(aggregators); | |
| 213 | + }, | |
| 233 | 214 | |
| 234 | - this.fields = this._copy(fields); | |
| 215 | +// setOrders : function(orders) { | |
| 216 | +// this.orders = this._copy(orders); | |
| 217 | +// }, | |
| 235 | 218 | |
| 236 | - var inputs = this._getInputs(); | |
| 237 | - if (inputs) | |
| 238 | - inputs.setFields(this.fields); | |
| 219 | + setSelectedFields : function(selectedFields) { | |
| 220 | + this.selectedFields = this._copy(selectedFields); | |
| 239 | 221 | }, |
| 240 | 222 | |
| 241 | 223 | setData : function(data) { |
| 242 | 224 | this.data = this._copy(data); |
| 243 | - }, | |
| 244 | 225 | |
| 245 | - init : function() { | |
| 246 | - this.$.vslider._reset(); | |
| 226 | + var converter = new DataTypeConverter(); | |
| 227 | + var result = converter.inferJsonDataType(data, ["*"]); | |
| 228 | + result = converter.cast(result); | |
| 229 | + this.$.inputs.setFields(ArrayUtils.toFieldsArray(result.types)); | |
| 230 | + this.$.vslider.setEnabledDatalets(ArrayUtils.toFieldsArray(result.types)); | |
| 247 | 231 | }, |
| 248 | 232 | |
| 249 | - show : function() {//show --> preselect | |
| 250 | -// if(this.preselectedDatalet) | |
| 251 | - if(this.dataletPreset) | |
| 252 | - this._preselectDatalet(); | |
| 253 | - | |
| 254 | -// if (this.$.datalet_selection_datalet_placeholder.innerHTML == "") { | |
| 255 | -// var inputs = this._getInputs(); | |
| 256 | -// inputs.fireReady(); | |
| 257 | -// } | |
| 233 | + init : function() { | |
| 234 | + if(this.selectedDatalet !== undefined) | |
| 235 | + this.$.vslider.reset();// fire _selectDatalet undefined | |
| 258 | 236 | }, |
| 259 | 237 | |
| 260 | 238 | _translate : function(){ |
| ... | ... | @@ -262,111 +240,82 @@ |
| 262 | 240 | this.$.add_button.innerHTML = ln["modifyDatalet_" + ln["localization"]]; |
| 263 | 241 | else |
| 264 | 242 | this.$.add_button.innerHTML = ln["addDatalet_" + ln["localization"]]; |
| 265 | - | |
| 266 | - this.$.dataletPreview.innerHTML = ln["dataletPreview_" + ln["localization"]]; | |
| 267 | 243 | }, |
| 268 | 244 | |
| 269 | 245 | _selectDatalet : function(e){ |
| 270 | - | |
| 271 | - this.$.add_button.setAttribute("disabled", "true"); | |
| 272 | - | |
| 273 | 246 | this.selectedDatalet = e.detail.datalet; |
| 274 | 247 | |
| 275 | - this.$.datalet_selection_datalet_placeholder.innerHTML = ""; | |
| 248 | + this.$.add_button.setAttribute("disabled", "true"); | |
| 249 | + this.$.preview.eraseDatalet(); | |
| 250 | + this.$.preview.eraseInfo(); | |
| 276 | 251 | |
| 277 | - if(!this.selectedDatalet){ | |
| 278 | - this.type = ""; | |
| 279 | - this.$.options.setOptions([]); | |
| 280 | - } | |
| 281 | - else{ | |
| 252 | + if(this.selectedDatalet) { | |
| 282 | 253 | this.$.selectedDatalet_request.url = this.deepUrl + e.detail.datalet + "-datalet"; |
| 283 | 254 | this.$.selectedDatalet_request.generateRequest(); |
| 284 | 255 | } |
| 256 | + else { | |
| 257 | + this.dataletType = undefined; | |
| 258 | + this.$.inputs._reset(); | |
| 259 | + } | |
| 285 | 260 | }, |
| 286 | 261 | |
| 287 | 262 | _handleSelectedDatalet : function(e){ |
| 263 | + this.$.preview.loadInfo(e.detail.response); | |
| 288 | 264 | |
| 289 | - if(this.type != e.detail.response.type) { | |
| 290 | - | |
| 291 | - this.type = e.detail.response.type; | |
| 292 | - | |
| 293 | - this.async(function () { | |
| 294 | - var inputs = this._getInputs(); | |
| 295 | - inputs.setFields(this.fields); | |
| 296 | - inputs.setInputs(e.detail.response.idm.inputs.input);// Cannot read property '0' of undefined | |
| 297 | - }, 0); | |
| 298 | - | |
| 299 | - this.$.options.setOptions(e.detail.response.idm.inputs.layouts.input); | |
| 265 | + if(this.dataletType != e.detail.response.type) { | |
| 266 | + this.dataletType = e.detail.response.type; | |
| 267 | + this.$.inputs.setInputs(e.detail.response.idm); | |
| 300 | 268 | } |
| 301 | 269 | else { |
| 302 | - this.$.options.checkOptions(e.detail.response.idm.inputs.layouts.input); | |
| 270 | + this.$.inputs._fire(); | |
| 303 | 271 | } |
| 304 | - | |
| 305 | - this.async(function () { | |
| 306 | - var inputs = this._getInputs(); | |
| 307 | - inputs.fireReady(); | |
| 308 | - }, 0); | |
| 309 | - | |
| 310 | -// this.async(function () { | |
| 311 | -// if(this.preselectedDatalet) | |
| 312 | -// this._preselectDatalet(); | |
| 313 | -// }, 1); | |
| 314 | - }, | |
| 315 | - | |
| 316 | - _preselectDatalet : function() { | |
| 317 | - this.$.vslider._preselectDatalet(); | |
| 318 | - | |
| 319 | - this.async(function () { | |
| 320 | - this.$.options._preselectOptions(this.dataletPreset); | |
| 321 | - }, 100); | |
| 322 | - | |
| 323 | - this.async(function () { | |
| 324 | - var inputs = this._getInputs(); | |
| 325 | - inputs._preselectInputs(this.fields, this.dataletPreset["aggregators"], this.dataletPreset["orders"]); | |
| 326 | - this.dataletPreset = undefined; | |
| 327 | - }, 200); | |
| 328 | 272 | }, |
| 329 | 273 | |
| 330 | - _tryLoadDatalet : function(){ | |
| 331 | - var inputs = this._getInputs(); | |
| 332 | - inputs.fireReady(); | |
| 274 | + preselect : function() { | |
| 275 | + if(this.preselectedDatalet) { | |
| 276 | + this.$.vslider.preselectDatalet(this.preselectedDatalet); | |
| 277 | + this.async(function () { | |
| 278 | + this.$.inputs._preselectInputs(this.dataletPreset); | |
| 279 | + this.preselectedDatalet = undefined; | |
| 280 | + }, 100); | |
| 281 | + } | |
| 333 | 282 | }, |
| 334 | 283 | |
| 335 | 284 | _loadDatalet : function(e){ |
| 336 | 285 | if(!e.detail.isReady) { |
| 337 | - this.$.datalet_selection_datalet_placeholder.innerHTML = ""; | |
| 286 | + this.$.preview.eraseDatalet(); | |
| 338 | 287 | return; |
| 339 | 288 | } |
| 340 | 289 | |
| 341 | - var inputs = this._getInputs(); | |
| 342 | - | |
| 343 | - this.selectedFields = inputs.getSelectedFields(); | |
| 344 | - | |
| 345 | -// console.log(inputs.getFields()); | |
| 346 | - | |
| 347 | - this.params = {'data-url' : this.dataUrl};//?????????????????? | |
| 348 | -// this.params = {}; | |
| 290 | + this.params = {'data-url' : this.dataUrl};/*???*/ | |
| 349 | 291 | |
| 350 | - this.params["selectedFields"] = JSON.stringify(inputs.getFields()); | |
| 292 | +// this.selectedFields = ["pippi", "baudo"]; | |
| 351 | 293 | |
| 294 | + this.params["selectedfields"] = JSON.stringify(this.$.inputs.getSelectedInputs()); | |
| 352 | 295 | this.params["filters"] = JSON.stringify(this.filters); |
| 353 | - this.params["aggregators"] = JSON.stringify(inputs.getAggregators()); | |
| 354 | - this.params["orders"] = JSON.stringify(inputs.getOrders()); | |
| 296 | + this.params["aggregators"] = JSON.stringify(this.aggregators); | |
| 297 | + this.params["orders"] = JSON.stringify(this.$.inputs.getOrders()); | |
| 355 | 298 | |
| 356 | 299 | this.params["export_menu"] = "0"; |
| 357 | 300 | |
| 358 | - var params = this.$.options.getParams(); | |
| 301 | + var params = this.$.inputs.getSelectedOptions(); | |
| 359 | 302 | for (var key in params) { this.params[key] = params[key]; } |
| 360 | 303 | |
| 361 | 304 | //use cache |
| 362 | - var data = alasql_QUERY(this.data, this.selectedFields, null, inputs.getAggregators(), inputs.getOrders()); | |
| 305 | + var selectedFields = this.$.inputs.getSelectedInputs(); | |
| 306 | + var fields = []; | |
| 307 | + for (var i=0; i < selectedFields.length; i++) | |
| 308 | + if (selectedFields[i]) | |
| 309 | + fields.push(selectedFields[i].value); | |
| 363 | 310 | |
| 364 | 311 | var converter = new DataTypeConverter(); |
| 312 | + | |
| 313 | + var data = alasql_QUERY(this.data, fields, null, null, this.$.inputs.getOrders()); | |
| 365 | 314 | var result = converter.inferJsonDataType(data, ["*"]); |
| 366 | 315 | result = converter.cast(result); |
| 367 | 316 | data = result.dataset; |
| 368 | 317 | |
| 369 | - data = alasql_transformData(data, this.selectedFields, true); | |
| 318 | + data = alasql_transformData(data, fields, true); | |
| 370 | 319 | |
| 371 | 320 | this.params["data"] = JSON.stringify(data).replace(/'/g, "'"); |
| 372 | 321 | // |
| ... | ... | @@ -374,45 +323,35 @@ |
| 374 | 323 | var dataletParams ={ |
| 375 | 324 | component: this.selectedDatalet+"-datalet", |
| 376 | 325 | fields: this.selectedFields, |
| 377 | - params: this.params, | |
| 378 | - placeHolder: this.$.datalet_selection_datalet_placeholder, | |
| 326 | + params: this.params | |
| 327 | +// placeHolder: this.$.datalet_placeholder | |
| 379 | 328 | }; |
| 380 | 329 | |
| 381 | - ComponentService.deep_url = this.deepUrl; | |
| 382 | - ComponentService.getComponent(dataletParams); | |
| 330 | +// ComponentService.deep_url = this.deepUrl; | |
| 331 | +// ComponentService.getComponent(dataletParams); | |
| 332 | + | |
| 333 | + this.$.preview.loadDatalet(dataletParams); | |
| 383 | 334 | |
| 384 | 335 | this.$.add_button.removeAttribute("disabled"); |
| 385 | 336 | }, |
| 386 | 337 | |
| 387 | 338 | _addDatalet : function(){ |
| 388 | - delete this.params["export_menu"]; | |
| 339 | + var staticData = this.params["data"]; | |
| 340 | + | |
| 389 | 341 | delete this.params["data"]; |
| 342 | + delete this.params["export_menu"]; | |
| 390 | 343 | |
| 391 | 344 | var data = { |
| 392 | 345 | dataUrl: this.dataUrl, |
| 393 | 346 | datalet: this.selectedDatalet+"-datalet", |
| 394 | 347 | fields: this.selectedFields, |
| 395 | 348 | params: this.params, |
| 396 | - staticData: JSON.stringify(this.$.datalet_selection_datalet_placeholder.children[1].behavior.data) | |
| 349 | + staticData: staticData | |
| 397 | 350 | } |
| 398 | 351 | |
| 399 | 352 | this.fire('data-sevc-controllet.dataletCreated', {data : data}); |
| 400 | 353 | }, |
| 401 | 354 | |
| 402 | - _checkType: function(type, check){ | |
| 403 | - if (type == "multiseries" || type == "") | |
| 404 | - return (type == check); | |
| 405 | - else if(check == "default") | |
| 406 | - return true; | |
| 407 | - return false; | |
| 408 | - }, | |
| 409 | - | |
| 410 | - _getInputs : function(){ | |
| 411 | - if(this.type == "multiseries") | |
| 412 | - return this.$$("#inputs_series") | |
| 413 | - return this.$$("#inputs"); | |
| 414 | - }, | |
| 415 | - | |
| 416 | 355 | _copy : function(o) { |
| 417 | 356 | var out, v, key; |
| 418 | 357 | out = Array.isArray(o) ? new Array(o.length) : {}; |
| ... | ... | @@ -427,11 +366,9 @@ |
| 427 | 366 | var h = Math.max(document.documentElement.clientHeight, window.innerHeight || 0) - 16; |
| 428 | 367 | h = h - 64 - 8; //height with page scroller |
| 429 | 368 | |
| 430 | - $("#items_vslider_controllet").height(h);//vslider controllet | |
| 431 | - $("#datalet_selection_inputs").height(h); | |
| 432 | - $("#datalet_selection_options").height(h); | |
| 433 | - | |
| 434 | - $("#datalet_selection_datalet").height(h); | |
| 369 | + $("#items_vslider_container").height(h); | |
| 370 | + $("#select_inputs_container").height(h); | |
| 371 | + $("#datalet_preview_container").height(h); | |
| 435 | 372 | } |
| 436 | 373 | |
| 437 | 374 | }); | ... | ... |
controllets/select-visualization-controllet/select-visualization-controllet_old.html
0 โ 100755
| 1 | +<link rel="import" href="../../bower_components/polymer/polymer.html" /> | |
| 2 | + | |
| 3 | +<link rel="import" href="../../bower_components/paper-material/paper-material.html" /> | |
| 4 | + | |
| 5 | +<link rel="import" href="../../bower_components/paper-button/paper-button.html"> | |
| 6 | + | |
| 7 | +<link rel="import" href="../items-vslider-controllet/items-vslider-controllet.html" /> | |
| 8 | +<link rel="import" href="select-datalet-inputs_series.html" /> | |
| 9 | +<link rel="import" href="select-datalet-inputs.html" /> | |
| 10 | +<link rel="import" href="select-datalet-options.html" /> | |
| 11 | + | |
| 12 | +<script src="../../../DEEPCLIENT/js/deepClient.js"></script> | |
| 13 | + | |
| 14 | +<dom-module id="select-visualization-controllet"> | |
| 15 | + | |
| 16 | + <template> | |
| 17 | + | |
| 18 | + <style is="custom-style"> | |
| 19 | + #select_visualization_container { | |
| 20 | + display: flex; | |
| 21 | + font-family: 'Roboto', 'Helvetica Neue', Helvetica, Arial, sans-serif; | |
| 22 | + font-size: 16px; | |
| 23 | + margin-top: 8px; | |
| 24 | + } | |
| 25 | + | |
| 26 | + #items_vslider_controllet { | |
| 27 | + position: relative; | |
| 28 | + min-width: 172px; | |
| 29 | + } | |
| 30 | + | |
| 31 | + #datalet_selection_inputs { | |
| 32 | + position: relative; | |
| 33 | + margin-left: 32px; | |
| 34 | + min-width: 258px; | |
| 35 | + } | |
| 36 | + | |
| 37 | + #datalet_selection_options { | |
| 38 | + position: relative; | |
| 39 | + margin-left: 32px; | |
| 40 | + min-width: 258px; | |
| 41 | + } | |
| 42 | + | |
| 43 | + #datalet_preview_container { | |
| 44 | + position: relative; | |
| 45 | + width: 100%; | |
| 46 | + margin-left: 32px; | |
| 47 | + } | |
| 48 | + | |
| 49 | + #datalet_selection_datalet { | |
| 50 | + position: relative; | |
| 51 | + height: 100vh; | |
| 52 | + width: 100%; | |
| 53 | + } | |
| 54 | + | |
| 55 | + #datalet_selection_datalet_placeholder { | |
| 56 | + padding: 16px; | |
| 57 | + } | |
| 58 | + | |
| 59 | + .input_header { | |
| 60 | + height: 32px; | |
| 61 | + padding-top: 16px; | |
| 62 | + text-align: center; | |
| 63 | + font-weight: 700; | |
| 64 | + background-color: #B6B6B6; | |
| 65 | + } | |
| 66 | + | |
| 67 | + paper-button { | |
| 68 | + position: absolute; | |
| 69 | + bottom: 16px; | |
| 70 | + right: 11px; | |
| 71 | + | |
| 72 | + height: 48px; | |
| 73 | + width: 172px; | |
| 74 | + background-color: #00BCD4; | |
| 75 | + color: white; | |
| 76 | + font-weight: 700; | |
| 77 | + padding: 16px; | |
| 78 | + } | |
| 79 | + | |
| 80 | + paper-button:hover { | |
| 81 | + background-color: #00AABF; | |
| 82 | + | |
| 83 | + box-shadow: 0px 8px 12px #888; | |
| 84 | + -webkit-box-shadow: 0px 8px 12px #888; | |
| 85 | + -moz-box-shadow: 0px 8px 12px #888; | |
| 86 | + } | |
| 87 | + | |
| 88 | + paper-button[disabled] { | |
| 89 | + background-color: #B6B6B6; | |
| 90 | + } | |
| 91 | + </style> | |
| 92 | + | |
| 93 | + <iron-ajax id="selectedDatalet_request" on-response="_handleSelectedDatalet"></iron-ajax> | |
| 94 | + | |
| 95 | + <div id="select_visualization_container"> | |
| 96 | + | |
| 97 | + <div id="items_vslider_controllet"> | |
| 98 | + <items-vslider-controllet id="vslider" datalets-list-url={{dataletsListUrl}} preselected-datalet={{preselectedDatalet}}></items-vslider-controllet> | |
| 99 | + </div> | |
| 100 | + | |
| 101 | + <div id="datalet_selection_inputs"> | |
| 102 | + <template is="dom-if" if="{{_checkType(type, 'multiseries')}}"> | |
| 103 | + <select-datalet-inputs_series id="inputs_series"></select-datalet-inputs_series> | |
| 104 | + </template> | |
| 105 | + <template is="dom-if" if="{{_checkType(type, 'default')}}"> | |
| 106 | + <select-datalet-inputs id="inputs"></select-datalet-inputs> | |
| 107 | + </template> | |
| 108 | + <template is="dom-if" if="{{_checkType(type, '')}}"> | |
| 109 | + <select-datalet-inputs></select-datalet-inputs> | |
| 110 | + </template> | |
| 111 | + </div> | |
| 112 | + | |
| 113 | + <div id="datalet_selection_options"> | |
| 114 | + <select-datalet-options id="options"></select-datalet-options> | |
| 115 | + </div> | |
| 116 | + | |
| 117 | + <div id="datalet_preview_container"> | |
| 118 | + | |
| 119 | + <paper-material id="datalet_selection_datalet" elevation="5"> | |
| 120 | + <div class="input_header"><span id="dataletPreview"></span></div> | |
| 121 | + <div id="datalet_selection_datalet_placeholder"></div> | |
| 122 | + </paper-material> | |
| 123 | + | |
| 124 | + <paper-button id="add_button" disabled raised on-click="_addDatalet"></paper-button> | |
| 125 | + | |
| 126 | + </div> | |
| 127 | + | |
| 128 | + </div> | |
| 129 | + | |
| 130 | + </template> | |
| 131 | + | |
| 132 | + <script> | |
| 133 | + | |
| 134 | + Polymer({ | |
| 135 | + | |
| 136 | + is : 'select-visualization-controllet', | |
| 137 | + | |
| 138 | + properties : { | |
| 139 | + | |
| 140 | + deepUrl : { | |
| 141 | + type : String, | |
| 142 | + value : undefined | |
| 143 | + }, | |
| 144 | + | |
| 145 | + dataletsListUrl : { | |
| 146 | + type : String, | |
| 147 | + value : undefined | |
| 148 | + }, | |
| 149 | + | |
| 150 | + selectedDatalet : { | |
| 151 | + type : String, | |
| 152 | + value : undefined | |
| 153 | + }, | |
| 154 | + | |
| 155 | + preselectedDatalet : { | |
| 156 | + type : String, | |
| 157 | + value : undefined | |
| 158 | + }, | |
| 159 | + | |
| 160 | + type : { | |
| 161 | + type : String, | |
| 162 | + value : "" | |
| 163 | + }, | |
| 164 | + | |
| 165 | + filters : { | |
| 166 | + type : Array, | |
| 167 | + value : [] | |
| 168 | + }, | |
| 169 | + | |
| 170 | + fields : { | |
| 171 | + type : Array, | |
| 172 | + value : [] | |
| 173 | + }, | |
| 174 | + | |
| 175 | + selectedFields : { | |
| 176 | + type : Array, | |
| 177 | + value : [] | |
| 178 | + }, | |
| 179 | + | |
| 180 | + dataletPreset : { | |
| 181 | + type : Object, | |
| 182 | + value : [] | |
| 183 | + }, | |
| 184 | + | |
| 185 | + dataUrl : { | |
| 186 | + type : String, | |
| 187 | + value : undefined | |
| 188 | + }, | |
| 189 | + | |
| 190 | + params:{ | |
| 191 | + type: Object, | |
| 192 | + value: undefined | |
| 193 | + }, | |
| 194 | + | |
| 195 | + data : { | |
| 196 | + type : Object, | |
| 197 | + value : undefined | |
| 198 | + }, | |
| 199 | + | |
| 200 | + }, | |
| 201 | + | |
| 202 | + listeners: { | |
| 203 | +// 'select-fields-controllet_selected-fields': '_updateFields', | |
| 204 | +// 'filters-controllet_filters': '_updateFilters', | |
| 205 | + 'items-vslider-controllet_selected-datalet': '_selectDatalet', | |
| 206 | + 'select_visualization_inputs_ready': '_loadDatalet', | |
| 207 | + 'select_visualization_options_changed': '_tryLoadDatalet' | |
| 208 | + }, | |
| 209 | + | |
| 210 | + ready : function() { | |
| 211 | + this._resize(); | |
| 212 | + | |
| 213 | + $(this.$.datalet_selection_datalet).perfectScrollbar(); | |
| 214 | + | |
| 215 | +// this.params = {'data-url' : this.dataUrl};//not here | |
| 216 | + }, | |
| 217 | + | |
| 218 | + attached : function() { | |
| 219 | + this._resize(); | |
| 220 | + var that = this; | |
| 221 | + window.addEventListener("resize", function() { that._resize(); }); | |
| 222 | + | |
| 223 | + this._translate(); | |
| 224 | + }, | |
| 225 | + | |
| 226 | + setFilters : function(filters) { | |
| 227 | + this.filters = this._copy(filters); | |
| 228 | + }, | |
| 229 | + | |
| 230 | + setFields : function(fields) { | |
| 231 | +// if (this.fields.length > 0 && JSON.stringify(this.fields) != JSON.stringify(fields)) | |
| 232 | +// this.init(); | |
| 233 | + | |
| 234 | + this.fields = this._copy(fields); | |
| 235 | + | |
| 236 | + var inputs = this._getInputs(); | |
| 237 | + if (inputs) | |
| 238 | + inputs.setFields(this.fields); | |
| 239 | + }, | |
| 240 | + | |
| 241 | + setData : function(data) { | |
| 242 | + this.data = this._copy(data); | |
| 243 | + }, | |
| 244 | + | |
| 245 | + init : function() { | |
| 246 | + this.$.vslider._reset(); | |
| 247 | + }, | |
| 248 | + | |
| 249 | + show : function() {//show --> preselect | |
| 250 | +// if(this.preselectedDatalet) | |
| 251 | + if(this.dataletPreset) | |
| 252 | + this._preselectDatalet(); | |
| 253 | + | |
| 254 | +// if (this.$.datalet_selection_datalet_placeholder.innerHTML == "") { | |
| 255 | +// var inputs = this._getInputs(); | |
| 256 | +// inputs.fireReady(); | |
| 257 | +// } | |
| 258 | + }, | |
| 259 | + | |
| 260 | + _translate : function(){ | |
| 261 | + if(this.preselectedDatalet) | |
| 262 | + this.$.add_button.innerHTML = ln["modifyDatalet_" + ln["localization"]]; | |
| 263 | + else | |
| 264 | + this.$.add_button.innerHTML = ln["addDatalet_" + ln["localization"]]; | |
| 265 | + | |
| 266 | + this.$.dataletPreview.innerHTML = ln["dataletPreview_" + ln["localization"]]; | |
| 267 | + }, | |
| 268 | + | |
| 269 | + _selectDatalet : function(e){ | |
| 270 | + | |
| 271 | + this.$.add_button.setAttribute("disabled", "true"); | |
| 272 | + | |
| 273 | + this.selectedDatalet = e.detail.datalet; | |
| 274 | + | |
| 275 | + this.$.datalet_selection_datalet_placeholder.innerHTML = ""; | |
| 276 | + | |
| 277 | + if(!this.selectedDatalet){ | |
| 278 | + this.type = ""; | |
| 279 | + this.$.options.setOptions([]); | |
| 280 | + } | |
| 281 | + else{ | |
| 282 | + this.$.selectedDatalet_request.url = this.deepUrl + e.detail.datalet + "-datalet"; | |
| 283 | + this.$.selectedDatalet_request.generateRequest(); | |
| 284 | + } | |
| 285 | + }, | |
| 286 | + | |
| 287 | + _handleSelectedDatalet : function(e){ | |
| 288 | + | |
| 289 | + if(this.type != e.detail.response.type) { | |
| 290 | + | |
| 291 | + this.type = e.detail.response.type; | |
| 292 | + | |
| 293 | + this.async(function () { | |
| 294 | + var inputs = this._getInputs(); | |
| 295 | + inputs.setFields(this.fields); | |
| 296 | + inputs.setInputs(e.detail.response.idm.inputs.input);// Cannot read property '0' of undefined | |
| 297 | + }, 0); | |
| 298 | + | |
| 299 | + this.$.options.setOptions(e.detail.response.idm.inputs.layouts.input); | |
| 300 | + } | |
| 301 | + else { | |
| 302 | + this.$.options.checkOptions(e.detail.response.idm.inputs.layouts.input); | |
| 303 | + } | |
| 304 | + | |
| 305 | + this.async(function () { | |
| 306 | + var inputs = this._getInputs(); | |
| 307 | + inputs.fireReady(); | |
| 308 | + }, 0); | |
| 309 | + | |
| 310 | +// this.async(function () { | |
| 311 | +// if(this.preselectedDatalet) | |
| 312 | +// this._preselectDatalet(); | |
| 313 | +// }, 1); | |
| 314 | + }, | |
| 315 | + | |
| 316 | + _preselectDatalet : function() { | |
| 317 | + this.$.vslider._preselectDatalet(); | |
| 318 | + | |
| 319 | + this.async(function () { | |
| 320 | + this.$.options._preselectOptions(this.dataletPreset); | |
| 321 | + }, 100); | |
| 322 | + | |
| 323 | + this.async(function () { | |
| 324 | + var inputs = this._getInputs(); | |
| 325 | + inputs._preselectInputs(this.fields, this.dataletPreset["aggregators"], this.dataletPreset["orders"]); | |
| 326 | + this.dataletPreset = undefined; | |
| 327 | + }, 200); | |
| 328 | + }, | |
| 329 | + | |
| 330 | + _tryLoadDatalet : function(){ | |
| 331 | + var inputs = this._getInputs(); | |
| 332 | + inputs.fireReady(); | |
| 333 | + }, | |
| 334 | + | |
| 335 | + _loadDatalet : function(e){ | |
| 336 | + if(!e.detail.isReady) { | |
| 337 | + this.$.datalet_selection_datalet_placeholder.innerHTML = ""; | |
| 338 | + return; | |
| 339 | + } | |
| 340 | + | |
| 341 | + var inputs = this._getInputs(); | |
| 342 | + | |
| 343 | + this.selectedFields = inputs.getSelectedFields(); | |
| 344 | + | |
| 345 | +// console.log(inputs.getFields()); | |
| 346 | + | |
| 347 | + this.params = {'data-url' : this.dataUrl};//?????????????????? | |
| 348 | +// this.params = {}; | |
| 349 | + | |
| 350 | + this.params["selectedfields"] = JSON.stringify(inputs.getFields()); | |
| 351 | + | |
| 352 | + this.params["filters"] = JSON.stringify(this.filters); | |
| 353 | + this.params["aggregators"] = JSON.stringify(inputs.getAggregators()); | |
| 354 | + this.params["orders"] = JSON.stringify(inputs.getOrders()); | |
| 355 | + | |
| 356 | + this.params["export_menu"] = "0"; | |
| 357 | + | |
| 358 | + var params = this.$.options.getParams(); | |
| 359 | + for (var key in params) { this.params[key] = params[key]; } | |
| 360 | + | |
| 361 | + //use cache | |
| 362 | + var data = alasql_QUERY(this.data, this.selectedFields, null, inputs.getAggregators(), inputs.getOrders()); | |
| 363 | + | |
| 364 | + var converter = new DataTypeConverter(); | |
| 365 | + var result = converter.inferJsonDataType(data, ["*"]); | |
| 366 | + result = converter.cast(result); | |
| 367 | + data = result.dataset; | |
| 368 | + | |
| 369 | + data = alasql_transformData(data, this.selectedFields, true); | |
| 370 | + | |
| 371 | + this.params["data"] = JSON.stringify(data).replace(/'/g, "'"); | |
| 372 | + // | |
| 373 | + | |
| 374 | + var dataletParams ={ | |
| 375 | + component: this.selectedDatalet+"-datalet", | |
| 376 | + fields: this.selectedFields, | |
| 377 | + params: this.params, | |
| 378 | + placeHolder: this.$.datalet_selection_datalet_placeholder, | |
| 379 | + }; | |
| 380 | + | |
| 381 | + ComponentService.deep_url = this.deepUrl; | |
| 382 | + ComponentService.getComponent(dataletParams); | |
| 383 | + | |
| 384 | + this.$.add_button.removeAttribute("disabled"); | |
| 385 | + }, | |
| 386 | + | |
| 387 | + _addDatalet : function(){ | |
| 388 | + delete this.params["export_menu"]; | |
| 389 | + delete this.params["data"]; | |
| 390 | + | |
| 391 | + var data = { | |
| 392 | + dataUrl: this.dataUrl, | |
| 393 | + datalet: this.selectedDatalet+"-datalet", | |
| 394 | + fields: this.selectedFields, | |
| 395 | + params: this.params, | |
| 396 | + staticData: JSON.stringify(this.$.datalet_selection_datalet_placeholder.children[1].behavior.data) | |
| 397 | + } | |
| 398 | + | |
| 399 | + this.fire('data-sevc-controllet.dataletCreated', {data : data}); | |
| 400 | + }, | |
| 401 | + | |
| 402 | + _checkType: function(type, check){ | |
| 403 | + if (type == "multiseries" || type == "") | |
| 404 | + return (type == check); | |
| 405 | + else if(check == "default") | |
| 406 | + return true; | |
| 407 | + return false; | |
| 408 | + }, | |
| 409 | + | |
| 410 | + _getInputs : function(){ | |
| 411 | + if(this.type == "multiseries") | |
| 412 | + return this.$$("#inputs_series") | |
| 413 | + return this.$$("#inputs"); | |
| 414 | + }, | |
| 415 | + | |
| 416 | + _copy : function(o) { | |
| 417 | + var out, v, key; | |
| 418 | + out = Array.isArray(o) ? new Array(o.length) : {}; | |
| 419 | + for (key in o) { | |
| 420 | + v = o[key]; | |
| 421 | + out[key] = (typeof v === "object") ? this._copy(v) : v; | |
| 422 | + } | |
| 423 | + return out; | |
| 424 | + }, | |
| 425 | + | |
| 426 | + _resize : function(){ | |
| 427 | + var h = Math.max(document.documentElement.clientHeight, window.innerHeight || 0) - 16; | |
| 428 | + h = h - 64 - 8; //height with page scroller | |
| 429 | + | |
| 430 | + $("#items_vslider_controllet").height(h);//vslider controllet | |
| 431 | + $("#datalet_selection_inputs").height(h); | |
| 432 | + $("#datalet_selection_options").height(h); | |
| 433 | + | |
| 434 | + $("#datalet_selection_datalet").height(h); | |
| 435 | + } | |
| 436 | + | |
| 437 | + }); | |
| 438 | + | |
| 439 | + </script> | |
| 440 | + | |
| 441 | +</dom-module> | |
| 0 | 442 | \ No newline at end of file | ... | ... |
datalets/areachart-datalet/areachart-datalet.html
| ... | ... | @@ -71,7 +71,7 @@ Example: |
| 71 | 71 | text: this._component.title |
| 72 | 72 | }, |
| 73 | 73 | xAxis: { |
| 74 | - categories: this.properties.categories.value,//this._component.categories, | |
| 74 | + categories: this.properties.categories.value, | |
| 75 | 75 | title: { |
| 76 | 76 | text: this._component.xAxisLabel |
| 77 | 77 | } |
| ... | ... | @@ -86,7 +86,13 @@ Example: |
| 86 | 86 | valueSuffix: ' ' + this._component.suffix |
| 87 | 87 | }, |
| 88 | 88 | plotOptions: { |
| 89 | + series: { | |
| 90 | + stacking: this._component.stack | |
| 91 | + }, | |
| 89 | 92 | area: { |
| 93 | + dataLabels: { | |
| 94 | + enabled: this._component.dataLabels | |
| 95 | + }, | |
| 90 | 96 | marker: { |
| 91 | 97 | enabled: false, |
| 92 | 98 | symbol: 'circle', |
| ... | ... | @@ -99,17 +105,6 @@ Example: |
| 99 | 105 | } |
| 100 | 106 | } |
| 101 | 107 | }, |
| 102 | - legend: { | |
| 103 | - layout: 'vertical', | |
| 104 | - align: 'right', | |
| 105 | - verticalAlign: 'top', | |
| 106 | - x: -40, | |
| 107 | - y: 80, | |
| 108 | - floating: true, | |
| 109 | - borderWidth: 1, | |
| 110 | - backgroundColor: ((Highcharts[this._component.theme] && Highcharts[this._component.theme].legendBackgroundColor) || '#FFFFFF'), | |
| 111 | - shadow: true | |
| 112 | - }, | |
| 113 | 108 | credits: { |
| 114 | 109 | enabled: false |
| 115 | 110 | }, |
| ... | ... | @@ -119,6 +114,27 @@ Example: |
| 119 | 114 | if(this._component.theme != "themeBase" && this._component.theme != "") |
| 120 | 115 | jQuery.extend(true, options, Highcharts[this._component.theme]); |
| 121 | 116 | |
| 117 | + if(this._component.legend == "topRight") | |
| 118 | + options.legend = { | |
| 119 | + layout: 'vertical', | |
| 120 | + verticalAlign: 'top', | |
| 121 | + align: 'right', | |
| 122 | + x: -4, | |
| 123 | + y: 4, | |
| 124 | + floating: true, | |
| 125 | + borderWidth: 1, | |
| 126 | + backgroundColor: ((Highcharts[this._component.theme] && Highcharts[this._component.theme].legendBackgroundColor) || '#FFFFFF'), | |
| 127 | + shadow: true | |
| 128 | + }; | |
| 129 | + else if(this._component.legend == "bottom") | |
| 130 | + options.legend = { | |
| 131 | + enabled: true | |
| 132 | + }; | |
| 133 | + else | |
| 134 | + options.legend ={ | |
| 135 | + enabled: false | |
| 136 | + }; | |
| 137 | + | |
| 122 | 138 | $(this._component.$.charts.$.container).highcharts(options); |
| 123 | 139 | } |
| 124 | 140 | }; |
| ... | ... | @@ -132,50 +148,34 @@ Example: |
| 132 | 148 | type: Array, |
| 133 | 149 | value: undefined |
| 134 | 150 | }, |
| 135 | - /** | |
| 136 | - * It's the label for X axis | |
| 137 | - * | |
| 138 | - * @attribute xAxisLabel | |
| 139 | - * @type String | |
| 140 | - * @default '' | |
| 141 | - */ | |
| 142 | 151 | xAxisLabel: { |
| 143 | 152 | type: String, |
| 144 | 153 | value: "" |
| 145 | 154 | }, |
| 146 | - /** | |
| 147 | - * It's the label for Y axis | |
| 148 | - * | |
| 149 | - * @attribute yAxisLabel | |
| 150 | - * @type String | |
| 151 | - * @default '' | |
| 152 | - */ | |
| 153 | 155 | yAxisLabel: { |
| 154 | 156 | type: String, |
| 155 | 157 | value: "" |
| 156 | 158 | }, |
| 157 | - /** | |
| 158 | - * It's the values suffix | |
| 159 | - * | |
| 160 | - * @attribute suffix | |
| 161 | - * @type Strig | |
| 162 | - * @default 'units' | |
| 163 | - */ | |
| 164 | 159 | suffix : { |
| 165 | 160 | type : String, |
| 166 | - value : "units" | |
| 161 | + value : "" | |
| 162 | + }, | |
| 163 | + legend : { | |
| 164 | + type : Object, | |
| 165 | + value : "topRight" | |
| 166 | + }, | |
| 167 | + dataLabels : { | |
| 168 | + type : Object, | |
| 169 | + value : true | |
| 170 | + }, | |
| 171 | + stack : { | |
| 172 | + type : Object, | |
| 173 | + value : false | |
| 167 | 174 | }, |
| 168 | 175 | theme : { |
| 169 | 176 | type : String, |
| 170 | 177 | value : "" |
| 171 | 178 | }, |
| 172 | - /** | |
| 173 | - * It's the component behavior | |
| 174 | - * | |
| 175 | - * @attribute behavior | |
| 176 | - * @type Object | |
| 177 | - * @default {} | |
| 178 | - */ | |
| 179 | 179 | behavior : { |
| 180 | 180 | type : Object, |
| 181 | 181 | value : {} | ... | ... |
datalets/areachart-datalet/areachart-datalet.png
datalets/areachart-datalet/areachart-datalet2.png
0 โ 100644
607 Bytes
datalets/barchart-datalet/barchart-datalet.html
| ... | ... | @@ -88,21 +88,13 @@ Example: |
| 88 | 88 | plotOptions: { |
| 89 | 89 | bar: { |
| 90 | 90 | dataLabels: { |
| 91 | - enabled: true | |
| 91 | + enabled: this._component.dataLabels | |
| 92 | 92 | } |
| 93 | + }, | |
| 94 | + series: { | |
| 95 | + stacking: this._component.stack | |
| 93 | 96 | } |
| 94 | 97 | }, |
| 95 | - legend: { | |
| 96 | - layout: 'vertical', | |
| 97 | - align: 'right', | |
| 98 | - verticalAlign: 'top', | |
| 99 | - x: -40, | |
| 100 | - y: 80, | |
| 101 | - floating: true, | |
| 102 | - borderWidth: 1, | |
| 103 | - backgroundColor: ((Highcharts[this._component.theme] && Highcharts[this._component.theme].legendBackgroundColor) || '#FFFFFF'), | |
| 104 | - shadow: true | |
| 105 | - }, | |
| 106 | 98 | credits: { |
| 107 | 99 | enabled: false |
| 108 | 100 | }, |
| ... | ... | @@ -112,6 +104,27 @@ Example: |
| 112 | 104 | if(this._component.theme != "themeBase" && this._component.theme != "") |
| 113 | 105 | jQuery.extend(true, options, Highcharts[this._component.theme]); |
| 114 | 106 | |
| 107 | + if(this._component.legend == "topRight") | |
| 108 | + options.legend = { | |
| 109 | + layout: 'vertical', | |
| 110 | + verticalAlign: 'top', | |
| 111 | + align: 'right', | |
| 112 | + x: -4, | |
| 113 | + y: 4, | |
| 114 | + floating: true, | |
| 115 | + borderWidth: 1, | |
| 116 | + backgroundColor: ((Highcharts[this._component.theme] && Highcharts[this._component.theme].legendBackgroundColor) || '#FFFFFF'), | |
| 117 | + shadow: true | |
| 118 | + }; | |
| 119 | + else if(this._component.legend == "bottom") | |
| 120 | + options.legend = { | |
| 121 | + enabled: true | |
| 122 | + }; | |
| 123 | + else | |
| 124 | + options.legend ={ | |
| 125 | + enabled: false | |
| 126 | + }; | |
| 127 | + | |
| 115 | 128 | $(this._component.$.charts.$.container).highcharts(options); |
| 116 | 129 | } |
| 117 | 130 | }; |
| ... | ... | @@ -136,6 +149,18 @@ Example: |
| 136 | 149 | type : String, |
| 137 | 150 | value : "" |
| 138 | 151 | }, |
| 152 | + legend : { | |
| 153 | + type : Object, | |
| 154 | + value : "topRight" | |
| 155 | + }, | |
| 156 | + dataLabels : { | |
| 157 | + type : Object, | |
| 158 | + value : true | |
| 159 | + }, | |
| 160 | + stack : { | |
| 161 | + type : Object, | |
| 162 | + value : false | |
| 163 | + }, | |
| 139 | 164 | theme : { |
| 140 | 165 | type : String, |
| 141 | 166 | value : "" | ... | ... |
datalets/base-ajax-json-alasql-datalet/static/js/AjaxJsonAlasqlBehavior.js
| ... | ... | @@ -95,12 +95,21 @@ var AjaxJsonAlasqlBehavior = { |
| 95 | 95 | }, |
| 96 | 96 | |
| 97 | 97 | filterData : function() { |
| 98 | - var fields = this._component.fields = JSON.parse(this._component.fields); | |
| 99 | - | |
| 98 | + var selectedFields = JSON.parse(this._component.getAttribute("selectedfields")); | |
| 100 | 99 | var filters = JSON.parse(this._component.getAttribute("filters")); |
| 101 | 100 | var aggregators = JSON.parse(this._component.getAttribute("aggregators")); |
| 102 | 101 | var orders = JSON.parse(this._component.getAttribute("orders")); |
| 103 | 102 | |
| 103 | + this._component.fields = JSON.parse(this._component.fields); /*deprecated*/ | |
| 104 | + if(selectedFields) { /*if deprecated*/ | |
| 105 | + this._component.fields = []; /*deprecated*/ | |
| 106 | + for (var i=0; i < selectedFields.length; i++) | |
| 107 | + if (selectedFields[i]) | |
| 108 | + this._component.fields.push(selectedFields[i].value); | |
| 109 | + } | |
| 110 | + | |
| 111 | + var fields = this._component.fields; | |
| 112 | + | |
| 104 | 113 | //preview my space ? |
| 105 | 114 | if(filters && filters[0] && filters[0].constructor == Array){ |
| 106 | 115 | filters = filters[0]; |
| ... | ... | @@ -109,14 +118,22 @@ var AjaxJsonAlasqlBehavior = { |
| 109 | 118 | } |
| 110 | 119 | |
| 111 | 120 | var converter = new DataTypeConverter(); |
| 112 | - | |
| 113 | - var data = alasql_QUERY(this.data, fields, filters, null, orders); | |
| 114 | - var result = converter.inferJsonDataType(data, ["*"]); | |
| 115 | - result = converter.cast(result); | |
| 116 | - data = result.dataset; | |
| 121 | + var data = []; | |
| 122 | + var result = []; | |
| 117 | 123 | |
| 118 | 124 | if(aggregators && aggregators.length) { |
| 119 | - data = alasql_QUERY(data, fields, null, aggregators, orders); | |
| 125 | + data = alasql_QUERY(this.data, "*", filters, null, orders); | |
| 126 | + result = converter.inferJsonDataType(data, ["*"]); | |
| 127 | + result = converter.cast(result); | |
| 128 | + data = result.dataset; | |
| 129 | + | |
| 130 | + data = alasql_QUERY(data, null, null, aggregators, orders); | |
| 131 | + result = converter.inferJsonDataType(data, ["*"]); | |
| 132 | + result = converter.cast(result); | |
| 133 | + data = result.dataset; | |
| 134 | + } | |
| 135 | + else { | |
| 136 | + data = alasql_QUERY(this.data, fields, filters, null, orders); | |
| 120 | 137 | result = converter.inferJsonDataType(data, ["*"]); |
| 121 | 138 | result = converter.cast(result); |
| 122 | 139 | data = result.dataset; |
| ... | ... | @@ -125,16 +142,4 @@ var AjaxJsonAlasqlBehavior = { |
| 125 | 142 | this.data = alasql_transformData(data, fields, true); |
| 126 | 143 | } |
| 127 | 144 | |
| 128 | - //var selectedFields = JSON.parse(this._component.getAttribute("selectedFields")); | |
| 129 | - //if(selectedFields) { | |
| 130 | - // fields = []; | |
| 131 | - // var inputs = []; | |
| 132 | - // for (var i=0; i < selectedFields.length; i++) { | |
| 133 | - // if (selectedFields[i]) { | |
| 134 | - // fields.push(selectedFields[i].field); | |
| 135 | - // inputs.push(selectedFields[i].input); | |
| 136 | - // } | |
| 137 | - // } | |
| 138 | - //} | |
| 139 | - | |
| 140 | 145 | }; |
| 141 | 146 | \ No newline at end of file | ... | ... |
datalets/base-datalet/base-datalet.html
datalets/base-datalet/static/js/BaseDataletBehavior.js
datalets/bubblechart-datalet/bubblechart-datalet.html
| ... | ... | @@ -93,7 +93,7 @@ Examples: |
| 93 | 93 | } |
| 94 | 94 | |
| 95 | 95 | this.properties.series = bubbleSeries; |
| 96 | - this._component.legend = true; | |
| 96 | +// this._component.legend = true; | |
| 97 | 97 | } |
| 98 | 98 | else {// == 4 |
| 99 | 99 | var bubbleSeries = []; |
| ... | ... | @@ -108,7 +108,7 @@ Examples: |
| 108 | 108 | bubbleSeries.push({data: series}); |
| 109 | 109 | |
| 110 | 110 | this.properties.series = bubbleSeries; |
| 111 | - this._component.legend = false; | |
| 111 | +// this._component.legend = false; | |
| 112 | 112 | } |
| 113 | 113 | |
| 114 | 114 | options = { |
| ... | ... | @@ -120,9 +120,6 @@ Examples: |
| 120 | 120 | title: { |
| 121 | 121 | text: this._component.title |
| 122 | 122 | }, |
| 123 | -// subtitle: { | |
| 124 | -// text: this._component.description | |
| 125 | -// }, | |
| 126 | 123 | xAxis: { |
| 127 | 124 | title: { |
| 128 | 125 | text: this._component.xAxisLabel |
| ... | ... | @@ -133,10 +130,12 @@ Examples: |
| 133 | 130 | text: this._component.yAxisLabel, |
| 134 | 131 | } |
| 135 | 132 | }, |
| 136 | - legend: { | |
| 137 | - enabled: this._component.legend, | |
| 138 | - }, | |
| 139 | 133 | plotOptions: { |
| 134 | + bubble: { | |
| 135 | + dataLabels: { | |
| 136 | + enabled: this._component.dataLabels | |
| 137 | + } | |
| 138 | + }, | |
| 140 | 139 | series: { |
| 141 | 140 | dataLabels: { |
| 142 | 141 | enabled: true, |
| ... | ... | @@ -153,6 +152,27 @@ Examples: |
| 153 | 152 | if(this._component.theme != "themeBase" && this._component.theme != "") |
| 154 | 153 | jQuery.extend(true, options, Highcharts[this._component.theme]); |
| 155 | 154 | |
| 155 | + if(this._component.legend == "topRight") | |
| 156 | + options.legend = { | |
| 157 | + layout: 'vertical', | |
| 158 | + verticalAlign: 'top', | |
| 159 | + align: 'right', | |
| 160 | + x: -4, | |
| 161 | + y: 4, | |
| 162 | + floating: true, | |
| 163 | + borderWidth: 1, | |
| 164 | + backgroundColor: ((Highcharts[this._component.theme] && Highcharts[this._component.theme].legendBackgroundColor) || '#FFFFFF'), | |
| 165 | + shadow: true | |
| 166 | + }; | |
| 167 | + else if(this._component.legend == "bottom") | |
| 168 | + options.legend = { | |
| 169 | + enabled: true | |
| 170 | + }; | |
| 171 | + else | |
| 172 | + options.legend ={ | |
| 173 | + enabled: false | |
| 174 | + }; | |
| 175 | + | |
| 156 | 176 | $(this._component.$.charts.$.container).highcharts(options); |
| 157 | 177 | } |
| 158 | 178 | }; |
| ... | ... | @@ -178,6 +198,10 @@ Examples: |
| 178 | 198 | type : String, |
| 179 | 199 | value : "" |
| 180 | 200 | }, |
| 201 | + legend : { | |
| 202 | + type : Object, | |
| 203 | + value : "topRight" | |
| 204 | + }, | |
| 181 | 205 | behavior : { |
| 182 | 206 | type : Object, |
| 183 | 207 | value : {} | ... | ... |
datalets/columnchart-datalet/columnchart-datalet.html
| ... | ... | @@ -66,7 +66,7 @@ Example: |
| 66 | 66 | options = { |
| 67 | 67 | chart: { |
| 68 | 68 | type: 'column', |
| 69 | - zoomType: 'xy', | |
| 69 | + zoomType: 'xy' | |
| 70 | 70 | }, |
| 71 | 71 | title: { |
| 72 | 72 | text: this._component.title |
| ... | ... | @@ -75,8 +75,7 @@ Example: |
| 75 | 75 | categories: this.properties.categories.value, |
| 76 | 76 | title: { |
| 77 | 77 | text: this._component.xAxisLabel |
| 78 | - }, | |
| 79 | -// crosshair: true | |
| 78 | + } | |
| 80 | 79 | }, |
| 81 | 80 | yAxis: { |
| 82 | 81 | min: 0, |
| ... | ... | @@ -84,41 +83,19 @@ Example: |
| 84 | 83 | text: this._component.yAxisLabel, |
| 85 | 84 | } |
| 86 | 85 | }, |
| 87 | -// tooltip: { | |
| 88 | -// headerFormat: '<span style="font-size:16px; font-weight: bold">{point.key}</span><table style="font-size:16px; white-space: nowrap ">', | |
| 89 | -// pointFormat: '<tr style="color:{series.color}"><td>{series.name}: </td>' + | |
| 90 | -// '<td>{point.y} ' + this._component.suffix + '</span></td></tr>', | |
| 91 | -// footerFormat: '</table>', | |
| 92 | -// shared: true, | |
| 93 | -// useHTML: true | |
| 94 | -// }, | |
| 95 | -// plotOptions: { | |
| 96 | -// column: { | |
| 97 | -// pointPadding: 0.2, | |
| 98 | -// borderWidth: 0 | |
| 99 | -// } | |
| 100 | -// }, | |
| 101 | 86 | tooltip: { |
| 102 | 87 | valueSuffix: ' ' + this._component.suffix |
| 103 | 88 | }, |
| 104 | 89 | plotOptions: { |
| 105 | 90 | column: { |
| 106 | 91 | dataLabels: { |
| 107 | - enabled: true | |
| 92 | + enabled: this._component.dataLabels | |
| 108 | 93 | } |
| 94 | + }, | |
| 95 | + series: { | |
| 96 | + stacking: this._component.stack | |
| 109 | 97 | } |
| 110 | 98 | }, |
| 111 | - legend: { | |
| 112 | - layout: 'vertical', | |
| 113 | - align: 'right', | |
| 114 | - verticalAlign: 'top', | |
| 115 | - x: -40, | |
| 116 | - y: 80, | |
| 117 | - floating: true, | |
| 118 | - borderWidth: 1, | |
| 119 | - backgroundColor: ((Highcharts[this._component.theme] && Highcharts[this._component.theme].legendBackgroundColor) || '#FFFFFF'), | |
| 120 | - shadow: true | |
| 121 | - }, | |
| 122 | 99 | credits: { |
| 123 | 100 | enabled: false |
| 124 | 101 | }, |
| ... | ... | @@ -128,6 +105,27 @@ Example: |
| 128 | 105 | if(this._component.theme != "themeBase" && this._component.theme != "") |
| 129 | 106 | jQuery.extend(true, options, Highcharts[this._component.theme]); |
| 130 | 107 | |
| 108 | + if(this._component.legend == "topRight") | |
| 109 | + options.legend = { | |
| 110 | + layout: 'vertical', | |
| 111 | + verticalAlign: 'top', | |
| 112 | + align: 'right', | |
| 113 | + x: -4, | |
| 114 | + y: 4, | |
| 115 | + floating: true, | |
| 116 | + borderWidth: 1, | |
| 117 | + backgroundColor: ((Highcharts[this._component.theme] && Highcharts[this._component.theme].legendBackgroundColor) || '#FFFFFF'), | |
| 118 | + shadow: true | |
| 119 | + }; | |
| 120 | + else if(this._component.legend == "bottom") | |
| 121 | + options.legend = { | |
| 122 | + enabled: true | |
| 123 | + }; | |
| 124 | + else | |
| 125 | + options.legend ={ | |
| 126 | + enabled: false | |
| 127 | + }; | |
| 128 | + | |
| 131 | 129 | $(this._component.$.charts.$.container).highcharts(options); |
| 132 | 130 | } |
| 133 | 131 | }; |
| ... | ... | @@ -140,51 +138,34 @@ Example: |
| 140 | 138 | type: Array, |
| 141 | 139 | value: undefined |
| 142 | 140 | }, |
| 143 | - /** | |
| 144 | - * It's the label for X axis | |
| 145 | - * | |
| 146 | - * @attribute xAxisLabel | |
| 147 | - * @type String | |
| 148 | - * @default '' | |
| 149 | - */ | |
| 150 | 141 | xAxisLabel: { |
| 151 | 142 | type: String, |
| 152 | 143 | value: "" |
| 153 | 144 | }, |
| 154 | - /** | |
| 155 | - * It's the label for Y axis | |
| 156 | - * | |
| 157 | - * @attribute yAxisLabel | |
| 158 | - * @type String | |
| 159 | - * @default '' | |
| 160 | - */ | |
| 161 | 145 | yAxisLabel: { |
| 162 | 146 | type: String, |
| 163 | 147 | value: "" |
| 164 | 148 | }, |
| 165 | - /** | |
| 166 | - * It's the values suffix | |
| 167 | - * | |
| 168 | - * @attribute suffix | |
| 169 | - * @type Strig | |
| 170 | - * @default 'units' | |
| 171 | - */ | |
| 172 | 149 | suffix : { |
| 173 | 150 | type : String, |
| 174 | 151 | value : "" |
| 175 | 152 | }, |
| 176 | - | |
| 153 | + legend : { | |
| 154 | + type : Object, | |
| 155 | + value : "topRight" | |
| 156 | + }, | |
| 157 | + dataLabels : { | |
| 158 | + type : Object, | |
| 159 | + value : true | |
| 160 | + }, | |
| 161 | + stack : { | |
| 162 | + type : Object, | |
| 163 | + value : false | |
| 164 | + }, | |
| 177 | 165 | theme : { |
| 178 | 166 | type : String, |
| 179 | 167 | value : "" |
| 180 | 168 | }, |
| 181 | - /** | |
| 182 | - * It's the component behavior | |
| 183 | - * | |
| 184 | - * @attribute behavior | |
| 185 | - * @type Object | |
| 186 | - * @default {} | |
| 187 | - */ | |
| 188 | 169 | behavior : { |
| 189 | 170 | type : Object, |
| 190 | 171 | value : {} | ... | ... |
datalets/heatmap-datalet/heatmap-datalet.html
| ... | ... | @@ -76,47 +76,35 @@ Example: |
| 76 | 76 | options = { |
| 77 | 77 | chart: { |
| 78 | 78 | type: 'heatmap', |
| 79 | - marginTop: 40, | |
| 79 | + zoomType: 'xy', | |
| 80 | +// marginTop: 40, | |
| 80 | 81 | // marginBottom: 80, |
| 81 | 82 | plotBorderWidth: 1 |
| 82 | 83 | }, |
| 83 | - | |
| 84 | 84 | title: { |
| 85 | 85 | text: this._component.title |
| 86 | 86 | }, |
| 87 | - | |
| 88 | 87 | xAxis: { |
| 89 | 88 | categories: Xcategories, |
| 90 | 89 | title: { |
| 91 | 90 | text: this._component.xAxisLabel |
| 92 | 91 | } |
| 93 | 92 | }, |
| 94 | - | |
| 95 | 93 | yAxis: { |
| 96 | 94 | categories: Ycategories, |
| 97 | 95 | title: { |
| 98 | 96 | text: this._component.yAxisLabel |
| 99 | 97 | } |
| 100 | 98 | }, |
| 101 | - | |
| 99 | + tooltip: { | |
| 100 | + valueSuffix: ' ' + this._component.suffix | |
| 101 | + }, | |
| 102 | 102 | colorAxis: { |
| 103 | 103 | min: 0, |
| 104 | 104 | minColor: '#FFFFFF', |
| 105 | 105 | maxColor: Highcharts.getOptions().colors[0] |
| 106 | 106 | }, |
| 107 | 107 | |
| 108 | - legend: { | |
| 109 | - align: 'right', | |
| 110 | - layout: 'vertical', | |
| 111 | - margin: 0, | |
| 112 | - verticalAlign: 'top', | |
| 113 | - y: 25, | |
| 114 | - symbolHeight: 280 | |
| 115 | - }, | |
| 116 | - tooltip: { | |
| 117 | - valueSuffix: ' ' + this._component.suffix | |
| 118 | - }, | |
| 119 | - | |
| 120 | 108 | credits: { |
| 121 | 109 | enabled: false |
| 122 | 110 | }, |
| ... | ... | @@ -124,15 +112,36 @@ Example: |
| 124 | 112 | borderWidth: 1, |
| 125 | 113 | data: series, |
| 126 | 114 | dataLabels: { |
| 127 | - enabled: true, | |
| 115 | + enabled: this._component.dataLabels, | |
| 128 | 116 | color: '#000000' |
| 129 | - } | |
| 117 | + }, | |
| 130 | 118 | }] |
| 131 | 119 | }; |
| 132 | 120 | |
| 133 | 121 | if(this._component.theme != "themeBase" && this._component.theme != "") |
| 134 | 122 | jQuery.extend(true, options, Highcharts[this._component.theme]); |
| 135 | 123 | |
| 124 | + if(this._component.legend == "topRight") | |
| 125 | + options.legend = { | |
| 126 | + layout: 'vertical', | |
| 127 | + verticalAlign: 'top', | |
| 128 | + align: 'right', | |
| 129 | + x: -4, | |
| 130 | + y: 4, | |
| 131 | + floating: true, | |
| 132 | + borderWidth: 1, | |
| 133 | + backgroundColor: ((Highcharts[this._component.theme] && Highcharts[this._component.theme].legendBackgroundColor) || '#FFFFFF'), | |
| 134 | + shadow: true, | |
| 135 | + }; | |
| 136 | + else if(this._component.legend == "bottom") | |
| 137 | + options.legend = { | |
| 138 | + enabled: true | |
| 139 | + }; | |
| 140 | + else | |
| 141 | + options.legend ={ | |
| 142 | + enabled: false | |
| 143 | + }; | |
| 144 | + | |
| 136 | 145 | $(this._component.$.charts.$.container).highcharts(options); |
| 137 | 146 | } |
| 138 | 147 | }; |
| ... | ... | @@ -146,50 +155,34 @@ Example: |
| 146 | 155 | type: Array, |
| 147 | 156 | value: undefined |
| 148 | 157 | }, |
| 149 | - /** | |
| 150 | - * It's the label for X axis | |
| 151 | - * | |
| 152 | - * @attribute xAxisLabel | |
| 153 | - * @type String | |
| 154 | - * @default '' | |
| 155 | - */ | |
| 156 | 158 | xAxisLabel: { |
| 157 | 159 | type: String, |
| 158 | 160 | value: "" |
| 159 | 161 | }, |
| 160 | - /** | |
| 161 | - * It's the label for Y axis | |
| 162 | - * | |
| 163 | - * @attribute yAxisLabel | |
| 164 | - * @type String | |
| 165 | - * @default '' | |
| 166 | - */ | |
| 167 | 162 | yAxisLabel: { |
| 168 | 163 | type: String, |
| 169 | 164 | value: "" |
| 170 | 165 | }, |
| 171 | - /** | |
| 172 | - * It's the values suffix | |
| 173 | - * | |
| 174 | - * @attribute suffix | |
| 175 | - * @type String | |
| 176 | - * @default 'units' | |
| 177 | - */ | |
| 178 | 166 | suffix : { |
| 179 | 167 | type : String, |
| 180 | 168 | value : "" |
| 181 | 169 | }, |
| 170 | + legend : { | |
| 171 | + type : Object, | |
| 172 | + value : "topRight" | |
| 173 | + }, | |
| 174 | + dataLabels : { | |
| 175 | + type : Object, | |
| 176 | + value : true | |
| 177 | + }, | |
| 178 | + stack : { | |
| 179 | + type : Object, | |
| 180 | + value : false | |
| 181 | + }, | |
| 182 | 182 | theme : { |
| 183 | 183 | type : String, |
| 184 | 184 | value : "" |
| 185 | 185 | }, |
| 186 | - /** | |
| 187 | - * It's the component behavior | |
| 188 | - * | |
| 189 | - * @attribute behavior | |
| 190 | - * @type Object | |
| 191 | - * @default {} | |
| 192 | - */ | |
| 193 | 186 | behavior : { |
| 194 | 187 | type : Object, |
| 195 | 188 | value : {} | ... | ... |
datalets/highcharts-datalet/highcharts-datalet.html
| ... | ... | @@ -79,31 +79,41 @@ Example : |
| 79 | 79 | }, |
| 80 | 80 | |
| 81 | 81 | transformData: function () { |
| 82 | - var selectedFields = JSON.parse(this._component.getAttribute("selectedFields")); | |
| 83 | - | |
| 84 | 82 | if(this.data.length == 0) |
| 85 | 83 | return; |
| 86 | 84 | |
| 87 | - categories = this.data[0].data; | |
| 88 | - series = []; | |
| 89 | - for(var i = 1; i < this.data.length; i++) | |
| 90 | - series.push(this.data[i]); | |
| 85 | + var selectedFields = JSON.parse(this._component.getAttribute("selectedfields")); | |
| 86 | + | |
| 87 | + var inputs = []; | |
| 88 | + if(selectedFields) { /*if deprecated*/ | |
| 89 | + for (var i=0; i < selectedFields.length; i++) | |
| 90 | + if (selectedFields[i]) | |
| 91 | + inputs.push(selectedFields[i].field); | |
| 92 | + } | |
| 93 | + | |
| 94 | + var cat_index = inputs.indexOf("Categories"); | |
| 91 | 95 | |
| 92 | - this.properties.categories.value = categories; | |
| 93 | - this.properties.series.value = series; | |
| 96 | + if(cat_index == -1) { | |
| 97 | + categories = this.data[0].data; | |
| 98 | + series = []; | |
| 99 | + for (var i = 1; i < this.data.length; i++) | |
| 100 | + series.push(this.data[i]); | |
| 94 | 101 | |
| 95 | - if(this.data.length == 3 && !selectedFields){//split cat | |
| 102 | + this.properties.categories.value = categories; | |
| 103 | + this.properties.series.value = series; | |
| 104 | + } | |
| 105 | + else { | |
| 96 | 106 | var x = this.data[0]["data"]; |
| 97 | - var gb = this.data[1]["data"]; | |
| 98 | - var y = this.data[2]["data"]; | |
| 107 | + var y = this.data[1]["data"]; | |
| 108 | + var cat = this.data[cat_index]["data"]; | |
| 99 | 109 | |
| 100 | 110 | var categories = x.filter(function(item, pos) { |
| 101 | 111 | return x.indexOf(item) == pos; |
| 102 | - }) | |
| 112 | + }); | |
| 103 | 113 | |
| 104 | - var s = gb.filter(function(item, pos) { | |
| 105 | - return gb.indexOf(item) == pos; | |
| 106 | - }) | |
| 114 | + var s = cat.filter(function(item, pos) { | |
| 115 | + return cat.indexOf(item) == pos; | |
| 116 | + }); | |
| 107 | 117 | |
| 108 | 118 | var series = []; |
| 109 | 119 | for(var i = 0; i < s.length; i++) { |
| ... | ... | @@ -113,7 +123,7 @@ Example : |
| 113 | 123 | for(var i = 0; i < y.length; i++){ |
| 114 | 124 | var index = categories.indexOf(x[i]); |
| 115 | 125 | var s = series.filter(function( obj ) { |
| 116 | - return obj.name == gb[i]; | |
| 126 | + return obj.name == cat[i]; | |
| 117 | 127 | }); |
| 118 | 128 | s[0]["data"][index] = y[i]; |
| 119 | 129 | } |
| ... | ... | @@ -121,7 +131,6 @@ Example : |
| 121 | 131 | this.properties.categories.value = categories; |
| 122 | 132 | this.properties.series.value = series; |
| 123 | 133 | } |
| 124 | - | |
| 125 | 134 | }, |
| 126 | 135 | |
| 127 | 136 | redraw: function () { | ... | ... |
datalets/leafletjs-geojson-datalet/leafletjs-geojson-datalet.png
datalets/linechart-datalet/linechart-datalet.html
| ... | ... | @@ -70,7 +70,7 @@ Example: |
| 70 | 70 | text: this._component.title |
| 71 | 71 | }, |
| 72 | 72 | xAxis: { |
| 73 | - categories: this.properties.categories.value,//this._component.categories, | |
| 73 | + categories: this.properties.categories.value, | |
| 74 | 74 | title: { |
| 75 | 75 | text: this._component.xAxisLabel |
| 76 | 76 | } |
| ... | ... | @@ -84,16 +84,15 @@ Example: |
| 84 | 84 | tooltip: { |
| 85 | 85 | valueSuffix: ' ' + this._component.suffix |
| 86 | 86 | }, |
| 87 | - legend: { | |
| 88 | - layout: 'vertical', | |
| 89 | - align: 'right', | |
| 90 | - verticalAlign: 'top', | |
| 91 | - x: -40, | |
| 92 | - y: 80, | |
| 93 | - floating: true, | |
| 94 | - borderWidth: 1, | |
| 95 | - backgroundColor: ((Highcharts[this._component.theme] && Highcharts[this._component.theme].legendBackgroundColor) || '#FFFFFF'), | |
| 96 | - shadow: true | |
| 87 | + plotOptions: { | |
| 88 | + line: { | |
| 89 | + dataLabels: { | |
| 90 | + enabled: this._component.dataLabels | |
| 91 | + } | |
| 92 | + }, | |
| 93 | + series: { | |
| 94 | + stacking: this._component.stack | |
| 95 | + } | |
| 97 | 96 | }, |
| 98 | 97 | credits: { |
| 99 | 98 | enabled: false |
| ... | ... | @@ -104,6 +103,27 @@ Example: |
| 104 | 103 | if(this._component.theme != "themeBase" && this._component.theme != "") |
| 105 | 104 | jQuery.extend(true, options, Highcharts[this._component.theme]); |
| 106 | 105 | |
| 106 | + if(this._component.legend == "topRight") | |
| 107 | + options.legend = { | |
| 108 | + layout: 'vertical', | |
| 109 | + verticalAlign: 'top', | |
| 110 | + align: 'right', | |
| 111 | + x: -4, | |
| 112 | + y: 4, | |
| 113 | + floating: true, | |
| 114 | + borderWidth: 1, | |
| 115 | + backgroundColor: ((Highcharts[this._component.theme] && Highcharts[this._component.theme].legendBackgroundColor) || '#FFFFFF'), | |
| 116 | + shadow: true | |
| 117 | + }; | |
| 118 | + else if(this._component.legend == "bottom") | |
| 119 | + options.legend = { | |
| 120 | + enabled: true | |
| 121 | + }; | |
| 122 | + else | |
| 123 | + options.legend ={ | |
| 124 | + enabled: false | |
| 125 | + }; | |
| 126 | + | |
| 107 | 127 | $(this._component.$.charts.$.container).highcharts(options); |
| 108 | 128 | } |
| 109 | 129 | }; |
| ... | ... | @@ -117,50 +137,34 @@ Example: |
| 117 | 137 | type: Array, |
| 118 | 138 | value: undefined |
| 119 | 139 | }, |
| 120 | - /** | |
| 121 | - * It's the label for X axis | |
| 122 | - * | |
| 123 | - * @attribute xAxisLabel | |
| 124 | - * @type String | |
| 125 | - * @default '' | |
| 126 | - */ | |
| 127 | 140 | xAxisLabel: { |
| 128 | 141 | type: String, |
| 129 | 142 | value: "" |
| 130 | 143 | }, |
| 131 | - /** | |
| 132 | - * It's the label for Y axis | |
| 133 | - * | |
| 134 | - * @attribute yAxisLabel | |
| 135 | - * @type String | |
| 136 | - * @default '' | |
| 137 | - */ | |
| 138 | 144 | yAxisLabel: { |
| 139 | 145 | type: String, |
| 140 | 146 | value: "" |
| 141 | 147 | }, |
| 142 | - /** | |
| 143 | - * It's the values suffix | |
| 144 | - * | |
| 145 | - * @attribute suffix | |
| 146 | - * @type Strig | |
| 147 | - * @default 'units' | |
| 148 | - */ | |
| 149 | 148 | suffix : { |
| 150 | 149 | type : String, |
| 151 | - value : "units" | |
| 150 | + value : "" | |
| 151 | + }, | |
| 152 | + legend : { | |
| 153 | + type : Object, | |
| 154 | + value : "topRight" | |
| 155 | + }, | |
| 156 | + dataLabels : { | |
| 157 | + type : Object, | |
| 158 | + value : true | |
| 159 | + }, | |
| 160 | + stack : { | |
| 161 | + type : Object, | |
| 162 | + value : false | |
| 152 | 163 | }, |
| 153 | 164 | theme : { |
| 154 | 165 | type : String, |
| 155 | 166 | value : "" |
| 156 | 167 | }, |
| 157 | - /** | |
| 158 | - * It's the component behavior | |
| 159 | - * | |
| 160 | - * @attribute behavior | |
| 161 | - * @type Object | |
| 162 | - * @default {} | |
| 163 | - */ | |
| 164 | 168 | behavior : { |
| 165 | 169 | type : Object, |
| 166 | 170 | value : {} | ... | ... |
datalets/piechart-datalet/piechart-datalet.html
| ... | ... | @@ -100,7 +100,7 @@ Example: |
| 100 | 100 | allowPointSelect: true, |
| 101 | 101 | cursor: 'pointer', |
| 102 | 102 | dataLabels: { |
| 103 | - enabled: true, | |
| 103 | + enabled: this._component.dataLabels, | |
| 104 | 104 | format: '<b>{point.name}</b>: {point.percentage:.1f} %', |
| 105 | 105 | style: { |
| 106 | 106 | color: (Highcharts[this._component.theme] && Highcharts[this._component.theme].contrastTextColor) || 'black' |
| ... | ... | @@ -117,6 +117,31 @@ Example: |
| 117 | 117 | if(this._component.theme != "themeBase" && this._component.theme != "") |
| 118 | 118 | jQuery.extend(true, options, Highcharts[this._component.theme]); |
| 119 | 119 | |
| 120 | + if(this._component.legend == "topRight") { | |
| 121 | + options.legend = { | |
| 122 | + layout: 'vertical', | |
| 123 | + verticalAlign: 'top', | |
| 124 | + align: 'right', | |
| 125 | + x: -4, | |
| 126 | + y: 4, | |
| 127 | + floating: true, | |
| 128 | + borderWidth: 1, | |
| 129 | + backgroundColor: ((Highcharts[this._component.theme] && Highcharts[this._component.theme].legendBackgroundColor) || '#FFFFFF'), | |
| 130 | + shadow: true | |
| 131 | + }; | |
| 132 | + options.plotOptions.pie.showInLegend = true; | |
| 133 | + } | |
| 134 | + else if(this._component.legend == "bottom") { | |
| 135 | + options.legend = { | |
| 136 | + enabled: true | |
| 137 | + }; | |
| 138 | + options.plotOptions.pie.showInLegend = true; | |
| 139 | + } | |
| 140 | + else | |
| 141 | + options.legend ={ | |
| 142 | + enabled: false | |
| 143 | + }; | |
| 144 | + | |
| 120 | 145 | $(this._component.$.charts.$.container).highcharts(options); |
| 121 | 146 | } |
| 122 | 147 | }; |
| ... | ... | @@ -134,14 +159,22 @@ Example: |
| 134 | 159 | type : String, |
| 135 | 160 | value : "" |
| 136 | 161 | }, |
| 137 | - theme : { | |
| 138 | - type : String, | |
| 139 | - value : "" | |
| 162 | + legend : { | |
| 163 | + type : Object, | |
| 164 | + value : "topRight" | |
| 165 | + }, | |
| 166 | + dataLabels : { | |
| 167 | + type : Object, | |
| 168 | + value : true | |
| 140 | 169 | }, |
| 141 | 170 | donut : { |
| 142 | 171 | type : String, |
| 143 | 172 | value : "false" |
| 144 | 173 | }, |
| 174 | + theme : { | |
| 175 | + type : String, | |
| 176 | + value : "" | |
| 177 | + }, | |
| 145 | 178 | behavior : { |
| 146 | 179 | type : Object, |
| 147 | 180 | value : {} | ... | ... |
datalets/scatterchart-datalet/scatterchart-datalet.html
| ... | ... | @@ -85,7 +85,7 @@ Example: |
| 85 | 85 | } |
| 86 | 86 | |
| 87 | 87 | this.properties.series = scatterSeries; |
| 88 | - this._component.legend = true; | |
| 88 | +// this._component.legend = true; | |
| 89 | 89 | } |
| 90 | 90 | else {// == 2 |
| 91 | 91 | var scatterSeries = []; |
| ... | ... | @@ -100,7 +100,7 @@ Example: |
| 100 | 100 | scatterSeries.push({data: series}); |
| 101 | 101 | |
| 102 | 102 | this.properties.series = scatterSeries; |
| 103 | - this._component.legend = false; | |
| 103 | +// this._component.legend = false; | |
| 104 | 104 | } |
| 105 | 105 | |
| 106 | 106 | options = { |
| ... | ... | @@ -121,8 +121,12 @@ Example: |
| 121 | 121 | text: this._component.yAxisLabel, |
| 122 | 122 | } |
| 123 | 123 | }, |
| 124 | - legend: { | |
| 125 | - enabled: this._component.legend, | |
| 124 | + plotOptions: { | |
| 125 | + scatter: { | |
| 126 | + dataLabels: { | |
| 127 | + enabled: this._component.dataLabels | |
| 128 | + } | |
| 129 | + }, | |
| 126 | 130 | }, |
| 127 | 131 | credits: { |
| 128 | 132 | enabled: false |
| ... | ... | @@ -133,6 +137,27 @@ Example: |
| 133 | 137 | if(this._component.theme != "themeBase" && this._component.theme != "") |
| 134 | 138 | jQuery.extend(true, options, Highcharts[this._component.theme]); |
| 135 | 139 | |
| 140 | + if(this._component.legend == "topRight") | |
| 141 | + options.legend = { | |
| 142 | + layout: 'vertical', | |
| 143 | + verticalAlign: 'top', | |
| 144 | + align: 'right', | |
| 145 | + x: -4, | |
| 146 | + y: 4, | |
| 147 | + floating: true, | |
| 148 | + borderWidth: 1, | |
| 149 | + backgroundColor: ((Highcharts[this._component.theme] && Highcharts[this._component.theme].legendBackgroundColor) || '#FFFFFF'), | |
| 150 | + shadow: true | |
| 151 | + }; | |
| 152 | + else if(this._component.legend == "bottom") | |
| 153 | + options.legend = { | |
| 154 | + enabled: true | |
| 155 | + }; | |
| 156 | + else | |
| 157 | + options.legend ={ | |
| 158 | + enabled: false | |
| 159 | + }; | |
| 160 | + | |
| 136 | 161 | $(this._component.$.charts.$.container).highcharts(options); |
| 137 | 162 | } |
| 138 | 163 | }; |
| ... | ... | @@ -153,14 +178,18 @@ Example: |
| 153 | 178 | type: String, |
| 154 | 179 | value: "" |
| 155 | 180 | }, |
| 156 | - suffix : { | |
| 157 | - type : String, | |
| 158 | - value : "" | |
| 159 | - }, | |
| 160 | 181 | theme : { |
| 161 | 182 | type : String, |
| 162 | 183 | value : "" |
| 163 | 184 | }, |
| 185 | + legend : { | |
| 186 | + type : Object, | |
| 187 | + value : "topRight" | |
| 188 | + }, | |
| 189 | + dataLabels : { | |
| 190 | + type : Object, | |
| 191 | + value : true | |
| 192 | + }, | |
| 164 | 193 | behavior : { |
| 165 | 194 | type : Object, |
| 166 | 195 | value : {} | ... | ... |
locales/controllet_ln.js
| ... | ... | @@ -5,16 +5,18 @@ ln["localization"] = "en"; |
| 5 | 5 | /******** EN ********/ |
| 6 | 6 | |
| 7 | 7 | //PAGE SLIDER |
| 8 | + | |
| 8 | 9 | ln["slide1Title_en"] = "SELECT DATASET"; |
| 9 | 10 | ln["slide1Subtitle_en"] = "Select a dataset from the list or copy and paste the url of dataset."; |
| 10 | 11 | ln["slide2Title_en"] = "SELECT DATA"; |
| 11 | 12 | ln["slide2Subtitle_en"] = "Select the fields on the left. The table will show the values related to the selected fields."; |
| 12 | 13 | ln["slide3Title_en"] = "SELECT VISUALIZATION"; |
| 13 | -ln["slide3Subtitle_en"] = "Select a visualization, fill out inputs and labels (optional)."; | |
| 14 | -ln["back_en"] = "Back"; | |
| 15 | -ln["forward_en"] = "Forward"; | |
| 14 | +ln["slide3Subtitle_en"] = "Select a visualization, fill out inputs and options."; | |
| 15 | +ln["back_en"] = "BACK TO THE FUTURE"; | |
| 16 | +ln["forward_en"] = "FORWARD"; | |
| 16 | 17 | |
| 17 | 18 | //SELECT DATASET |
| 19 | + | |
| 18 | 20 | ln["listView_en"] = "LIST VIEW"; |
| 19 | 21 | ln["treeMapView_en"] = "TREE MAP VIEW"; |
| 20 | 22 | ln["extendedSearch_en"] = "EXTENDED SEARCH"; |
| ... | ... | @@ -23,13 +25,11 @@ ln["showing_en"] = "Showing"; |
| 23 | 25 | ln["to_en"] = "to"; |
| 24 | 26 | ln["of_en"] = "of"; |
| 25 | 27 | ln["datasets_en"] = "datasets"; |
| 26 | -//ln["availableDatasets_en"] = "Available datasets"; | |
| 27 | 28 | ln["suggestedDatasets_en"] = "Suggested datasets"; |
| 28 | 29 | ln["selectedUrl_en"] = "Selected url"; |
| 29 | 30 | ln["wrongUrl_en"] = "Invalid url or data provider not supported yet."; |
| 30 | 31 | |
| 31 | 32 | //SELECT DATA |
| 32 | -ln["expertAddFilters_en"] = "EXPERT : ADD FILTERS"; | |
| 33 | 33 | |
| 34 | 34 | //select-fields |
| 35 | 35 | ln["fields_en"] = "FIELDS"; |
| ... | ... | @@ -43,496 +43,573 @@ ln["rows_en"] = "rows"; |
| 43 | 43 | ln["type_en"] = "TYPE"; |
| 44 | 44 | ln["warning_en"] = "WARNING"; |
| 45 | 45 | |
| 46 | +//expert | |
| 47 | +ln["expert_en"] = "EXPERT MODE"; | |
| 48 | +ln["filters_en"] = "FILTERS"; | |
| 49 | +ln["groupBy_en"] = "GROUP BY"; | |
| 50 | +ln["query_en"] = "QUERY"; | |
| 51 | + | |
| 52 | +//ln["disableFilters_en"] = "DISABLE FILTERS"; | |
| 53 | +//ln["enableFilters_en"] = "ENABLE FILTERS"; | |
| 54 | +//ln["disableGroupBy_en"] = "DISABLE GROUP BY"; | |
| 55 | +//ln["enableGroupBy_en"] = "ENABLE GROUP BY"; | |
| 56 | + | |
| 46 | 57 | //filters |
| 47 | 58 | ln["filterField_en"] = "Field"; |
| 48 | 59 | ln["filterOperation_en"] = "Operation"; |
| 49 | 60 | ln["filterValue_en"] = "Value"; |
| 50 | 61 | |
| 51 | -ln["=_en"] = "is equal to"; | |
| 52 | -ln["!=_en"] = "is different from"; | |
| 53 | -ln[">_en"] = "is greater than"; | |
| 54 | -ln[">=_en"] = "is greater than or equal to"; | |
| 55 | -ln["<_en"] = "is less than"; | |
| 56 | -ln["<=_en"] = "is less than or equal to"; | |
| 62 | +ln["disableFilters_en"] = "DISABLE FILTERS"; | |
| 63 | +ln["enableFilters_en"] = "ENABLE FILTERS"; | |
| 64 | + | |
| 65 | +//ln["=_en"] = "is equal to"; | |
| 66 | +//ln["!=_en"] = "is not equal to"; | |
| 67 | +//ln[">_en"] = "is greater than"; | |
| 68 | +//ln[">=_en"] = "is greater than or equal to"; | |
| 69 | +//ln["<_en"] = "is less than"; | |
| 70 | +//ln["<=_en"] = "is less than or equal to"; | |
| 71 | +ln["=_en"] = "="; | |
| 72 | +ln["!=_en"] = "not ="; | |
| 73 | +ln[">_en"] = ">"; | |
| 74 | +ln[">=_en"] = ">="; | |
| 75 | +ln["<_en"] = "<"; | |
| 76 | +ln["<=_en"] = "<="; | |
| 57 | 77 | ln["contains_en"] = "contains"; |
| 58 | 78 | ln["notContains_en"] = "not contains"; |
| 59 | 79 | ln["start_en"] = "start with"; |
| 60 | 80 | ln["ends_en"] = "ends with"; |
| 61 | 81 | |
| 82 | +//aggregators | |
| 83 | +ln["GROUP BY_en"] = "GROUP BY"; | |
| 84 | +ln["CALCULATE_en"] = "CALCULATE"; | |
| 85 | +ln["Calculate_en"] = "Calculate"; | |
| 86 | +ln["aggregatorField_en"] = "Field"; | |
| 87 | + | |
| 88 | +ln["disableGroupBy_en"] = "DISABLE GROUP BY"; | |
| 89 | +ln["enableGroupBy_en"] = "ENABLE GROUP BY"; | |
| 90 | + | |
| 91 | +ln["COUNT_en"] = "COUNT of"; | |
| 92 | +ln["SUM_en"] = "SUM of"; | |
| 93 | +ln["MIN_en"] = "MIN of"; | |
| 94 | +ln["MAX_en"] = "MAX of"; | |
| 95 | +ln["AVG_en"] = "AVG of"; | |
| 96 | +ln["FIRST_en"] = "FIRST of"; | |
| 97 | +ln["LAST_en"] = "LAST of"; | |
| 98 | + | |
| 62 | 99 | //SELECT VISUALIZATION |
| 63 | -ln["inputs_en"] = "INPUTS"; | |
| 64 | -ln["baseInfo_en"] = "BASE INFO"; | |
| 65 | -ln["layouts_en"] = "LABELS / OPTIONS"; | |
| 66 | -ln["dataletPreview_en"] = "DATALET PREVIEW"; | |
| 100 | + | |
| 67 | 101 | ln["addDatalet_en"] = "ADD"; |
| 68 | 102 | ln["modifyDatalet_en"] = "MODIFY"; |
| 69 | 103 | |
| 104 | +//datalet-preview | |
| 105 | +ln["previewTab_en"] = "DATALET PREVIEW"; | |
| 106 | +ln["infoTab_en"] = "DATALET INFO"; | |
| 107 | + | |
| 108 | +//select-inputs | |
| 109 | +ln["baseInfo_en"] = "BASE INFO"; | |
| 110 | +ln["inputs_en"] = "INPUTS"; | |
| 111 | +ln["options_en"] = "OPTIONS"; | |
| 112 | + | |
| 70 | 113 | //vslider |
| 71 | 114 | ln["search_en"] = "Search"; |
| 72 | 115 | |
| 73 | 116 | ln["datatable_en"] = "Table"; |
| 74 | -ln["barchart_en"] = "Bar"; | |
| 75 | -ln["columnchart_en"] = "Column"; | |
| 76 | -ln["areachart_en"] = "Area"; | |
| 77 | -ln["linechart_en"] = "Line"; | |
| 117 | +ln["barchart_en"] = "Bar Chart"; | |
| 118 | +ln["columnchart_en"] = "Column Chart"; | |
| 119 | +ln["areachart_en"] = "Area Chart"; | |
| 120 | +ln["linechart_en"] = "Line Chart"; | |
| 78 | 121 | ln["heatmap_en"] = "Heat Map"; |
| 79 | -ln["barchart_stacked_en"] = "Stacked Bar"; | |
| 80 | -ln["columnchart_stacked_en"] = "Stacked Column"; | |
| 81 | -ln["areachart_stacked_en"] = "Stacked Area"; | |
| 82 | -ln["piechart_en"] = "Pie"; | |
| 83 | -ln["scatterchart_en"] = "Scatter"; | |
| 84 | -ln["bubblechart_en"] = "Bubble"; | |
| 122 | +ln["piechart_en"] = "Pie Chart"; | |
| 123 | +ln["scatterchart_en"] = "Scatter Chart"; | |
| 124 | +ln["bubblechart_en"] = "Bubble Chart"; | |
| 85 | 125 | ln["treemap_en"] = "Tree Map"; |
| 86 | 126 | ln["leafletjs_en"] = "Map"; |
| 87 | -ln["leafletjs-geojson_en"] = "Map Geojson"; | |
| 127 | +ln["leafletjs-geojson_en"] = "Geojson Map"; | |
| 128 | + | |
| 129 | +ln["datatableDescription_en"] = "Table"; | |
| 130 | +ln["barchartDescription_en"] = "A bar chart is a chart that presents grouped data with rectangular bars with lengths proportional to the values that they represent."; | |
| 131 | +ln["columnchartDescription_en"] = "Column Chart"; | |
| 132 | +ln["areachartDescription_en"] = "Area Chart"; | |
| 133 | +ln["linechartDescription_en"] = "Line Chart"; | |
| 134 | +ln["heatmapDescription_en"] = "Heat Map"; | |
| 135 | +ln["piechartDescription_en"] = "Pie Chart"; | |
| 136 | +ln["scatterchartDescription_en"] = "Scatter Chart"; | |
| 137 | +ln["bubblechartDescription_en"] = "Bubble Chart"; | |
| 138 | +ln["treemapDescription_en"] = "Tree Map"; | |
| 139 | +ln["leafletjsDescription_en"] = "Map"; | |
| 140 | +ln["leafletjs-geojsonDescription_en"] = "Geojson Map"; | |
| 88 | 141 | |
| 89 | 142 | //inputs |
| 90 | -ln["expertGroupBy_en"] = "EXPERT : GROUP BY"; | |
| 91 | - | |
| 92 | -ln["sortAscending_en"] = "sorted ascending"; | |
| 93 | -ln["sortDescending_en"] = "sorted descending"; | |
| 94 | -ln["unsort_en"] = "unsorted"; | |
| 143 | +ln["title_en"] = "Title" | |
| 144 | +ln["description_en"] = "Description"; | |
| 95 | 145 | |
| 96 | -ln["groupBy_en"] = "GROUP BY"; | |
| 97 | -ln["calculate_en"] = "CALCULATE"; | |
| 98 | - | |
| 99 | -ln["COUNT_en"] = "COUNT of"; | |
| 100 | -ln["SUM_en"] = "SUM of"; | |
| 101 | -ln["MIN_en"] = "MIN of"; | |
| 102 | -ln["MAX_en"] = "MAX of"; | |
| 103 | -ln["AVG_en"] = "AVG of"; | |
| 104 | -ln["FIRST_en"] = "FIRST of"; | |
| 105 | -ln["LAST_en"] = "LAST of"; | |
| 146 | +//ln["sortAscending_en"] = "sorted ascending"; | |
| 147 | +//ln["sortDescending_en"] = "sorted descending"; | |
| 148 | +//ln["unsort_en"] = "unsorted"; | |
| 106 | 149 | |
| 150 | +//--> "_" not allowed! | |
| 151 | +ln["TITLE_en"] = "TITLE"; | |
| 152 | +ln["DESCRIPTION_en"] = "DESCRIPTION"; | |
| 107 | 153 | ln["XAxis_en"] = "X AXIS"; |
| 108 | 154 | ln["YAxis_en"] = "Y AXIS"; |
| 109 | -ln["NumericXAxis_en"] = "X AXIS [num]"; | |
| 110 | -ln["NumericYAxis_en"] = "Y AXIS [num]"; | |
| 155 | +ln["NumericXAxis_en"] = "X AXIS"; | |
| 156 | +ln["NumericYAxis_en"] = "Y AXIS"; | |
| 111 | 157 | ln["Column_en"] = "COLUMN"; |
| 112 | 158 | ln["Level_en"] = "LEVEL"; |
| 113 | 159 | ln["SliceLabels_en"] = "LABEL"; |
| 114 | -ln["SliceSizes_en"] = "SIZE [num]"; | |
| 160 | +ln["SliceSizes_en"] = "SIZE"; | |
| 115 | 161 | ln["Latitude_en"] = "LATITUDE"; |
| 116 | 162 | ln["Longitude_en"] = "LONGITUDE"; |
| 117 | -ln["BalloonContent_en"] = "BALLOON CONTENT";// [opt] | |
| 163 | +ln["BalloonContent_en"] = "BALLOON CONTENT"; | |
| 118 | 164 | ln["GEOJSON_en"] = "GEOJSON"; |
| 119 | 165 | ln["BubbleContent_en"] = "BUBBLE CONTENT"; |
| 120 | -ln["BubbleSize_en"] = "BUBBLE SIZE [num]"; | |
| 121 | -ln["Categories_en"] = "CATEGORY [opt]"; | |
| 166 | +ln["BubbleSize_en"] = "BUBBLE SIZE"; | |
| 167 | +ln["Categories_en"] = "CATEGORY"; | |
| 168 | + | |
| 169 | +ln["TITLEDescription_en"] = "TITLE."; | |
| 170 | +ln["DESCRIPTIONDescription_en"] = "DESCRIPTION."; | |
| 171 | +ln["XAxisDescription_en"] = "X AXIS."; | |
| 172 | +ln["YAxisDescription_en"] = "Y AXIS."; | |
| 173 | +ln["NumericXAxisDescription_en"] = "X AXIS."; | |
| 174 | +ln["NumericYAxisDescription_en"] = "Y AXIS."; | |
| 175 | +ln["ColumnDescription_en"] = "COLUMN."; | |
| 176 | +ln["LevelDescription_en"] = "LEVEL."; | |
| 177 | +ln["SliceLabelsDescription_en"] = "LABEL."; | |
| 178 | +ln["SliceSizesDescription_en"] = "SIZE."; | |
| 179 | +ln["LatitudeDescription_en"] = "LATITUDE."; | |
| 180 | +ln["LongitudeDescription_en"] = "LONGITUDE."; | |
| 181 | +ln["BalloonContentDescription_en"] = "BALLOON CONTENT."; | |
| 182 | +ln["GEOJSONDescription_en"] = "GEOJSON."; | |
| 183 | +ln["BubbleContentDescription_en"] = "BUBBLE CONTENT."; | |
| 184 | +ln["BubbleSizeDescription_en"] = "BUBBLE SIZE."; | |
| 185 | +ln["CategoriesDescription_en"] = "CATEGORY."; | |
| 122 | 186 | |
| 123 | 187 | //options |
| 124 | -ln["title_en"] = "Title" | |
| 125 | -ln["description_en"] = "Description"; | |
| 126 | - | |
| 127 | 188 | ln["x-axis-label_en"] = "X Axis Label"; |
| 128 | 189 | ln["y-axis-label_en"] = "Y Axis Label"; |
| 129 | 190 | ln["suffix_en"] = "Tooltip Suffix"; |
| 130 | -ln["theme_en"] = "Theme"; | |
| 191 | +ln["legend_en"] = "Leged"; | |
| 192 | +ln["data-labels_en"] = "Show Data Labels"; | |
| 131 | 193 | ln["stack_en"] = "Stack"; |
| 194 | +ln["theme_en"] = "Theme"; | |
| 132 | 195 | ln["donut_en"] = "Donut"; |
| 133 | 196 | |
| 134 | -ln["x-axis-label_description_en"] = "The label shown on the X axis"; | |
| 135 | -ln["y-axis-label_description_en"] = "The label shown on the Y axis"; | |
| 136 | -ln["suffix_description_en"] = "The suffix added to values ($,%, Kg, ...)"; | |
| 137 | -ln["theme_description_en"] = "The theme affects the appearance and colors of the graph"; | |
| 138 | -ln["stack_description_en"] = "If 'percent' normalization to 100 will be applied"; | |
| 139 | -ln["donut_description_en"] = "If 'true' Pie will become Donut! :)"; | |
| 140 | - | |
| 141 | -/******** IT ********/ | |
| 142 | - | |
| 143 | -//PAGE SLIDER | |
| 144 | -ln["slide1Title_it"] = "SELEZIONA IL DATASET"; | |
| 145 | -ln["slide1Subtitle_it"] = "Seleziona il dataset dalla lista o copia e incolla la url del dataset."; | |
| 146 | -ln["slide2Title_it"] = "SELEZIONA I DATI"; | |
| 147 | -ln["slide2Subtitle_it"] = "Seleziona i campi sulla sinistra. Nella tabella saranno mostrati i valori dei campi selezionati."; | |
| 148 | -ln["slide3Title_it"] = "SELEZIONA LA VISUALIZZAZIONE"; | |
| 149 | -ln["slide3Subtitle_it"] = "Seleziona una visualizzazione, inserisci dati di input ed etichette (opzionale)."; | |
| 150 | -ln["back_it"] = "Indietro"; | |
| 151 | -ln["forward_it"] = "Avanti"; | |
| 152 | - | |
| 153 | -//SELECT DATASET | |
| 154 | -ln["listView_it"] = "ELENCO"; | |
| 155 | -ln["treeMapView_it"] = "GRAFICO AD ALBERO"; | |
| 156 | -ln["extendedSearch_it"] = "RICERCA ESTESA"; | |
| 157 | -ln["provider_it"] = "Provider"; | |
| 158 | -ln["showing_it"] = "Visualizzati"; | |
| 159 | -ln["to_it"] = "a"; | |
| 160 | -ln["of_it"] = "di"; | |
| 161 | -ln["datasets_it"] = "datasets"; | |
| 162 | -//ln["availableDatasets_it"] = "Dataset disponibili"; | |
| 163 | -ln["suggestedDatasets_it"] = "Dataset suggeriti"; | |
| 164 | -ln["selectedUrl_it"] = "Url selezionata"; | |
| 165 | -ln["wrongUrl_it"] = "Url invalido o data provider non ancora supportato."; | |
| 166 | - | |
| 167 | -//SELECT DATA | |
| 168 | -ln["expertAddFilters_it"] = "ESPERTO : AGGIUNGI FILTRI"; | |
| 169 | - | |
| 170 | -//select-fields | |
| 171 | -ln["fields_it"] = "CAMPI"; | |
| 172 | - | |
| 173 | -//data-table | |
| 174 | -ln["selectedData_it"] = "DATI SELEZIONATI"; | |
| 175 | -ln["rows_it"] = "righe"; | |
| 176 | -ln["type_it"] = "TIPO"; | |
| 177 | -ln["warning_it"] = "ATTENZIONE"; | |
| 178 | - | |
| 179 | -//filters | |
| 180 | -ln["filterField_it"] = "Campo"; | |
| 181 | -ln["filterOperation_it"] = "Operazione"; | |
| 182 | -ln["filterValue_it"] = "Valore"; | |
| 183 | - | |
| 184 | -ln["=_it"] = "รจ uguale a"; | |
| 185 | -ln["!=_it"] = "รจ diverso da"; | |
| 186 | -ln[">_it"] = "รจ maggiore di"; | |
| 187 | -ln[">=_it"] = "รจ maggiore uguale di"; | |
| 188 | -ln["<_it"] = "รจ minore di"; | |
| 189 | -ln["<=_it"] = "รจ minore uguale di"; | |
| 190 | -ln["contains_it"] = "contiene"; | |
| 191 | -ln["notContains_it"] = "non contiene"; | |
| 192 | -ln["start_it"] = "inizia con"; | |
| 193 | -ln["ends_it"] = "finisce con"; | |
| 194 | - | |
| 195 | -//SELECT VISUALIZATION | |
| 196 | -ln["inputs_it"] = "DATI DI INPUT"; | |
| 197 | -ln["baseInfo_it"] = "INFORMAZIONI DI BASE"; | |
| 198 | -ln["layouts_it"] = "ETICHETTE / OPZIONI"; | |
| 199 | -ln["dataletPreview_it"] = "ANTEPRIMA DELLA DATALET"; | |
| 200 | -ln["addDatalet_it"] = "AGGIUNGI"; | |
| 201 | -ln["modifyDatalet_it"] = "MODIFICA"; | |
| 202 | - | |
| 203 | -//vslider | |
| 204 | -ln["search_it"] = "Cerca"; | |
| 205 | - | |
| 206 | -ln["datatable_it"] = "Tabella"; | |
| 207 | -ln["barchart_it"] = "Grafico a barre"; | |
| 208 | -ln["columnchart_it"] = "Grafico a colonne"; | |
| 209 | -ln["areachart_it"] = "Grafico ad area"; | |
| 210 | -ln["linechart_it"] = "Grafico a linee"; | |
| 211 | -ln["heatmap_it"] = "Mappa termica"; | |
| 212 | -ln["barchart_stacked_it"] = "Grafico a barre in pila"; | |
| 213 | -ln["columnchart_stacked_it"] = "Grafico a colonne in pila"; | |
| 214 | -ln["areachart_stacked_it"] = "Grafico ad area in pila"; | |
| 215 | -ln["piechart_it"] = "Grafico a torta"; | |
| 216 | -ln["scatterchart_it"] = "Grafico a dispersione"; | |
| 217 | -ln["bubblechart_it"] = "Grafico a bolle"; | |
| 218 | -ln["treemap_it"] = "Grafico ad albero"; | |
| 219 | -ln["leafletjs_it"] = "Mappa"; | |
| 220 | -ln["leafletjs-geojson_it"] = "Mappa geojson"; | |
| 221 | - | |
| 222 | -//inputs | |
| 223 | -ln["expertGroupBy_it"] = "ESPERTO : RAGGRUPPA"; | |
| 224 | - | |
| 225 | -ln["sortAscending_it"] = "ordinamento crescente"; | |
| 226 | -ln["sortDescending_it"] = "ordinamento decrescente"; | |
| 227 | -ln["unsort_it"] = "non ordinato"; | |
| 228 | - | |
| 229 | -ln["groupBy_it"] = "RAGGRUPPA"; | |
| 230 | -ln["calculate_it"] = "CALCOLA"; | |
| 231 | - | |
| 232 | -ln["COUNT_it"] = "CONTEGGIO di"; | |
| 233 | -ln["SUM_it"] = "SOMMA di"; | |
| 234 | -ln["MIN_it"] = "MINIMO di"; | |
| 235 | -ln["MAX_it"] = "MASSIMO di"; | |
| 236 | -ln["AVG_it"] = "MEDIA di"; | |
| 237 | -ln["FIRST_it"] = "PRIMO di"; | |
| 238 | -ln["LAST_it"] = "ULTIMO di"; | |
| 239 | - | |
| 240 | -ln["XAxis_it"] = "ASSE X"; | |
| 241 | -ln["YAxis_it"] = "ASSE Y"; | |
| 242 | -ln["NumericXAxis_it"] = "ASSE X [num]"; | |
| 243 | -ln["NumericYAxis_it"] = "ASSE Y [num]"; | |
| 244 | -ln["Column_it"] = "COLONNA"; | |
| 245 | -ln["Level_it"] = "LIVELLO"; | |
| 246 | -ln["SliceLabels_it"] = "ETICHETTA"; | |
| 247 | -ln["SliceSizes_it"] = "DIMENSIONE [num]"; | |
| 248 | -ln["Latitude_it"] = "LATITUDINE"; | |
| 249 | -ln["Longitude_it"] = "LONGITUDINE"; | |
| 250 | -ln["BalloonContent_it"] = "CONTENUTO"; | |
| 251 | -ln["GEOJSON_it"] = "GEOJSON"; | |
| 252 | -ln["BubbleContent_it"] = "CONTENUTO BOLLA"; | |
| 253 | -ln["BubbleSize_it"] = "DIMENSIONE BOLLA [num]"; | |
| 254 | -ln["Categories_it"] = "CATEGORIA [opt]"; | |
| 255 | - | |
| 256 | -//options | |
| 257 | -ln["title_it"] = "Titolo" | |
| 258 | -ln["description_it"] = "Descrizione"; | |
| 259 | - | |
| 260 | -ln["x-axis-label_it"] = "Etichetta asse X"; | |
| 261 | -ln["y-axis-label_it"] = "Etichetta asse Y"; | |
| 262 | -ln["suffix_it"] = "Suffisso tooltip"; | |
| 263 | -ln["theme_it"] = "Tema"; | |
| 264 | -ln["stack_it"] = "Stack"; | |
| 265 | -ln["donut_it"] = "Ciambella"; | |
| 266 | - | |
| 267 | -ln["x-axis-label_description_it"] = "L'etichetta che verrร visualizzata sull'asse delle X"; | |
| 268 | -ln["y-axis-label_description_it"] = "L'etichetta che verrร visualizzata sull'asse delle Y"; | |
| 269 | -ln["suffix_description_it"] = "Il suffisso che verrร aggiunto ai valori ($, %, Kg, ...)"; | |
| 270 | -ln["theme_description_it"] = "Il tema influenza l'estetica e i colori del grafico"; | |
| 271 | -ln["stack_description_it"] = "Se 'percent' sarร applicata la normalizzazione a 100"; | |
| 272 | -ln["donut_description_it"] = "Se 'true' il grafico a torta diventerร a ciambella! :)"; | |
| 273 | - | |
| 274 | -/******** FR ********/ | |
| 275 | - | |
| 276 | -//PAGE SLIDER | |
| 277 | -ln["slide1Title_fr"] = "SELECTIONNER UN JEU DE DONNEES"; | |
| 278 | -ln["slide1Subtitle_fr"] = "Rechercher ou copier/coller lโurl du jeu de donnรฉes."; | |
| 279 | -ln["slide2Title_fr"] = "SELECTIONNER DONNEES"; | |
| 280 | -ln["slide2Subtitle_fr"] = "Sรฉlectionner les champs ร partir de lโarborescence. Une fenรชtre vous indiquera les valeurs relatives aux champs sรฉlectionnรฉs."; | |
| 281 | -ln["slide3Title_fr"] = "SELECTIONNER UN MODE DE VISUALISATION"; | |
| 282 | -ln["slide3Subtitle_fr"] = "Sรฉlectionner un mode de visualisation, remplir les entrรฉes et les vignettes (optionnel)."; | |
| 283 | -ln["back_fr"] = "RETOUR"; | |
| 284 | -ln["forward_fr"] = "AVANT"; | |
| 285 | - | |
| 286 | -//SELECT DATASET | |
| 287 | -ln["listView_fr"] = "VUE EN LISTE"; | |
| 288 | -ln["treeMapView_fr"] = "VUE EN ARBORESCENCE"; | |
| 289 | -ln["extendedSearch_fr"] = "EXTENDED SEARCH"; | |
| 290 | -ln["provider_fr"] = "Provider"; | |
| 291 | -ln["showing_fr"] = "Showing"; | |
| 292 | -ln["to_fr"] = "to"; | |
| 293 | -ln["of_fr"] = "of"; | |
| 294 | -ln["datasets_fr"] = "datasets"; | |
| 295 | -//ln["availableDatasets_fr"] = "Jeux de donnรฉes disponibles"; | |
| 296 | -ln["suggestedDatasets_fr"] = "Jeux de donnรฉes suggรฉrรฉs"; | |
| 297 | -ln["selectedUrl_fr"] = "Sรฉlectionner URL"; | |
| 298 | -ln["wrongUrl_fr"] = "Invalid url or data provider not supported yet."; | |
| 299 | - | |
| 300 | -//SELECT DATA | |
| 301 | -ln["expertAddFilters_fr"] = "EXPERT : ADD FILTERS"; | |
| 302 | - | |
| 303 | -//select-fields | |
| 304 | -ln["fields_fr"] = "FIELDS"; | |
| 305 | - | |
| 306 | -//data-table | |
| 307 | -ln["selectedData_fr"] = "SELECTED DATA"; | |
| 308 | -ln["rows_fr"] = "rows"; | |
| 309 | -ln["type_fr"] = "TYPE"; | |
| 310 | -ln["warning_fr"] = "WARNING"; | |
| 311 | - | |
| 312 | -//filters | |
| 313 | -ln["filterField_fr"] = "Field"; | |
| 314 | -ln["filterOperation_fr"] = "Operation"; | |
| 315 | -ln["filterValue_fr"] = "Value"; | |
| 316 | - | |
| 317 | -ln["=_fr"] = "is equal to"; | |
| 318 | -ln["!=_fr"] = "is different from"; | |
| 319 | -ln[">_fr"] = "is greater than"; | |
| 320 | -ln[">=_fr"] = "is greater than or equal to"; | |
| 321 | -ln["<_fr"] = "is less than"; | |
| 322 | -ln["<=_fr"] = "is less than or equal to"; | |
| 323 | -ln["contains_fr"] = "contains"; | |
| 324 | -ln["notContains_fr"] = "not contains"; | |
| 325 | -ln["start_fr"] = "start with"; | |
| 326 | -ln["ends_fr"] = "ends with"; | |
| 327 | - | |
| 328 | -//SELECT VISUALIZATION | |
| 329 | -ln["inputs_fr"] = "SORTIES"; | |
| 330 | -ln["baseInfo_fr"] = "INFORMATION DE BASE"; | |
| 331 | -ln["layouts_fr"] = "VIGNETTES/OPTIONSs"; | |
| 332 | -ln["dataletPreview_fr"] = "PREVISUALISATION"; | |
| 333 | -ln["addDatalet_fr"] = "AJOUTER"; | |
| 334 | -ln["modifyDatalet_fr"] = "MODIFIER"; | |
| 335 | - | |
| 336 | -//vslider | |
| 337 | -ln["search_fr"] = "Search"; | |
| 338 | - | |
| 339 | -ln["datatable_fr"] = "Table"; | |
| 340 | -ln["barchart_fr"] = "Bar"; | |
| 341 | -ln["columnchart_fr"] = "Column"; | |
| 342 | -ln["areachart_fr"] = "Area"; | |
| 343 | -ln["linechart_fr"] = "Line"; | |
| 344 | -ln["heatmap_fr"] = "Heat Map"; | |
| 345 | -ln["barchart_stacked_fr"] = "Stacked Bar"; | |
| 346 | -ln["columnchart_stacked_fr"] = "Stacked Column"; | |
| 347 | -ln["areachart_stacked_fr"] = "Stacked Area"; | |
| 348 | -ln["piechart_fr"] = "Pie"; | |
| 349 | -ln["scatterchart_fr"] = "Scatter"; | |
| 350 | -ln["bubblechart_fr"] = "Bubble"; | |
| 351 | -ln["treemap_fr"] = "Tree Map"; | |
| 352 | -ln["leafletjs_fr"] = "Map"; | |
| 353 | -ln["leafletjs-geojson_fr"] = "Map Geojson"; | |
| 354 | - | |
| 355 | -//inputs | |
| 356 | -ln["expertGroupBy_fr"] = "EXPERT : GROUP BY"; | |
| 357 | - | |
| 358 | -ln["sortAscending_fr"] = "sorted ascending"; | |
| 359 | -ln["sortDescending_fr"] = "sorted descending"; | |
| 360 | -ln["unsort_fr"] = "unsorted"; | |
| 361 | - | |
| 362 | -ln["groupBy_fr"] = "GROUP BY"; | |
| 363 | -ln["calculate_fr"] = "CALCULATE"; | |
| 364 | - | |
| 365 | -ln["COUNT_fr"] = "COUNT of"; | |
| 366 | -ln["SUM_fr"] = "SUM of"; | |
| 367 | -ln["MIN_fr"] = "MIN of"; | |
| 368 | -ln["MAX_fr"] = "MAX of"; | |
| 369 | -ln["AVG_fr"] = "AVG of"; | |
| 370 | -ln["FIRST_fr"] = "FIRST of"; | |
| 371 | -ln["LAST_fr"] = "LAST of"; | |
| 372 | - | |
| 373 | -ln["XAxis_fr"] = "X AXIS"; | |
| 374 | -ln["YAxis_fr"] = "Y AXIS"; | |
| 375 | -ln["NumericXAxis_fr"] = "X AXIS [num]"; | |
| 376 | -ln["NumericYAxis_fr"] = "Y AXIS [num]"; | |
| 377 | -ln["Column_fr"] = "COLUMN"; | |
| 378 | -ln["Level_fr"] = "LEVEL"; | |
| 379 | -ln["SliceLabels_fr"] = "LABEL"; | |
| 380 | -ln["SliceSizes_fr"] = "SIZE [num]"; | |
| 381 | -ln["Latitude_fr"] = "LATITUDE"; | |
| 382 | -ln["Longitude_fr"] = "LONGITUDE"; | |
| 383 | -ln["BalloonContent_fr"] = "BALLOON CONTENT";// [opt] | |
| 384 | -ln["GEOJSON_fr"] = "GEOJSON"; | |
| 385 | -ln["BubbleContent_fr"] = "BUBBLE CONTENT"; | |
| 386 | -ln["BubbleSize_fr"] = "BUBBLE SIZE [num]"; | |
| 387 | -ln["Categories_fr"] = "CATEGORY [opt]"; | |
| 388 | - | |
| 389 | -//options | |
| 390 | -ln["title_fr"] = "Title" | |
| 391 | -ln["description_fr"] = "Description"; | |
| 392 | - | |
| 393 | -ln["x-axis-label_fr"] = "X Axis Label"; | |
| 394 | -ln["y-axis-label_fr"] = "Y Axis Label"; | |
| 395 | -ln["suffix_fr"] = "Tooltip Suffix"; | |
| 396 | -ln["theme_fr"] = "Theme"; | |
| 397 | -ln["stack_fr"] = "Stack"; | |
| 398 | -ln["donut_fr"] = "Donut"; | |
| 399 | - | |
| 400 | -ln["x-axis-label_description_fr"] = "Vignette pour lโaxe X."; | |
| 401 | -ln["y-axis-label_description_fr"] = "Vignette pour lโaxe Y."; | |
| 402 | -ln["suffix_description_fr"] = "Unitรฉs de mesures (ex: dollars, euros."; | |
| 403 | -ln["theme_description_fr"] = "Theme"; | |
| 404 | -ln["stack_description_fr"] = "Stack"; | |
| 405 | -ln["donut_description_fr"] = "Donut"; | |
| 406 | - | |
| 407 | -/******** NL ********/ | |
| 408 | - | |
| 409 | -//PAGE SLIDER | |
| 410 | -ln["slide1Title_nl"] = "SELECTEER DATASET"; | |
| 411 | -ln["slide1Subtitle_nl"] = "Zoek of kopieer en plak de url van de dataset."; | |
| 412 | -ln["slide2Title_nl"] = "SELECTEER DATA"; | |
| 413 | -ln["slide2Subtitle_nl"] = "Selecteer de velden uit de boomstructuur. De multi-tabel laat de waarden zien van de geselecteerde velden."; | |
| 414 | -ln["slide3Title_nl"] = "SELECTEER VISUALISATIE"; | |
| 415 | -ln["slide3Subtitle_nl"] = "Selecteer een visualisatie, vul de invoer en labels in."; | |
| 416 | -ln["back_nl"] = "TERUG"; | |
| 417 | -ln["forward_nl"] = "VOOTUIT"; | |
| 418 | - | |
| 419 | -//SELECT DATASET | |
| 420 | -ln["listView_nl"] = "LIJSTWEERGAVE"; | |
| 421 | -ln["treeMapView_nl"] = "BOOMSTRUCTUUR WEEERGAVE"; | |
| 422 | -ln["extendedSearch_nl"] = "EXTENDED SEARCH"; | |
| 423 | -ln["provider_nl"] = "Provider"; | |
| 424 | -ln["showing_nl"] = "Showing"; | |
| 425 | -ln["to_nl"] = "to"; | |
| 426 | -ln["of_nl"] = "of"; | |
| 427 | -ln["datasets_nl"] = "datasets"; | |
| 428 | -//ln["availableDatasets_nl"] = "Beschikbare datasets"; | |
| 429 | -ln["suggestedDatasets_nl"] = "Voeg aanbevolen datasets"; | |
| 430 | -ln["selectedUrl_nl"] = "Selecteer url"; | |
| 431 | -ln["wrongUrl_nl"] = "Ongeldige url of data provider nog niet ondersteund."; | |
| 432 | - | |
| 433 | -//SELECT DATA | |
| 434 | -ln["expertAddFilters_nl"] = "EXPERT : ADD FILTERS"; | |
| 435 | - | |
| 436 | -//select-fields | |
| 437 | -ln["fields_nl"] = "FIELDS"; | |
| 438 | - | |
| 439 | -//data-table | |
| 440 | -ln["selectedData_nl"] = "SELECTED DATA"; | |
| 441 | -ln["rows_nl"] = "rows"; | |
| 442 | -ln["type_nl"] = "TYPE"; | |
| 443 | -ln["warning_nl"] = "WARNING"; | |
| 444 | - | |
| 445 | -//filters | |
| 446 | -ln["filterField_nl"] = "Field"; | |
| 447 | -ln["filterOperation_nl"] = "Operation"; | |
| 448 | -ln["filterValue_nl"] = "Value"; | |
| 449 | - | |
| 450 | -ln["=_nl"] = "is equal to"; | |
| 451 | -ln["!=_nl"] = "is different from"; | |
| 452 | -ln[">_nl"] = "is greater than"; | |
| 453 | -ln[">=_nl"] = "is greater than or equal to"; | |
| 454 | -ln["<_nl"] = "is less than"; | |
| 455 | -ln["<=_nl"] = "is less than or equal to"; | |
| 456 | -ln["contains_nl"] = "contains"; | |
| 457 | -ln["notContains_nl"] = "not contains"; | |
| 458 | -ln["start_nl"] = "start with"; | |
| 459 | -ln["ends_nl"] = "ends with"; | |
| 460 | - | |
| 461 | -//SELECT VISUALIZATION | |
| 462 | -ln["inputs_nl"] = "INPUTS"; | |
| 463 | -ln["baseInfo_nl"] = "BASIS INFO"; | |
| 464 | -ln["layouts_nl"] = "LABELS / OPTIES"; | |
| 465 | -ln["dataletPreview_nl"] = "VOORBEELD"; | |
| 466 | -ln["addDatalet_nl"] = "TOEVOEGEN"; | |
| 467 | -ln["modifyDatalet_nl"] = "WIJZIGEN"; | |
| 468 | - | |
| 469 | -//vslider | |
| 470 | -ln["search_nl"] = "Search"; | |
| 471 | - | |
| 472 | -ln["datatable_nl"] = "Tafel"; | |
| 473 | -ln["barchart_nl"] = "Bar"; | |
| 474 | -ln["columnchart_nl"] = "Column"; | |
| 475 | -ln["areachart_nl"] = "Area"; | |
| 476 | -ln["linechart_nl"] = "Line"; | |
| 477 | -ln["heatmap_nl"] = "Heat Map"; | |
| 478 | -ln["barchart_stacked_nl"] = "Stacked Bar"; | |
| 479 | -ln["columnchart_stacked_nl"] = "Stacked Column"; | |
| 480 | -ln["areachart_stacked_nl"] = "Stacked Area"; | |
| 481 | -ln["piechart_nl"] = "Pie"; | |
| 482 | -ln["scatterchart_nl"] = "Scatter"; | |
| 483 | -ln["bubblechart_nl"] = "Bubble"; | |
| 484 | -ln["treemap_nl"] = "Tree Map"; | |
| 485 | -ln["leafletjs_nl"] = "Map"; | |
| 486 | -ln["leafletjs-geojson_nl"] = "Map Geojson"; | |
| 487 | - | |
| 488 | -//inputs | |
| 489 | -ln["expertGroupBy_nl"] = "EXPERT : GROUP BY"; | |
| 490 | - | |
| 491 | -ln["sortAscending_nl"] = "sorted ascending"; | |
| 492 | -ln["sortDescending_nl"] = "sorted descending"; | |
| 493 | -ln["unsort_nl"] = "unsorted"; | |
| 494 | - | |
| 495 | -ln["groupBy_nl"] = "GROUP BY"; | |
| 496 | -ln["calculate_nl"] = "CALCULATE"; | |
| 497 | - | |
| 498 | -ln["COUNT_nl"] = "COUNT of"; | |
| 499 | -ln["SUM_nl"] = "SUM of"; | |
| 500 | -ln["MIN_nl"] = "MIN of"; | |
| 501 | -ln["MAX_nl"] = "MAX of"; | |
| 502 | -ln["AVG_nl"] = "AVG of"; | |
| 503 | -ln["FIRST_nl"] = "FIRST of"; | |
| 504 | -ln["LAST_nl"] = "LAST of"; | |
| 505 | - | |
| 506 | -ln["XAxis_nl"] = "X AXIS"; | |
| 507 | -ln["YAxis_nl"] = "Y AXIS"; | |
| 508 | -ln["NumericXAxis_nl"] = "X AXIS [num]"; | |
| 509 | -ln["NumericYAxis_nl"] = "Y AXIS [num]"; | |
| 510 | -ln["Column_nl"] = "COLUMN"; | |
| 511 | -ln["Level_nl"] = "LEVEL"; | |
| 512 | -ln["SliceLabels_nl"] = "LABEL"; | |
| 513 | -ln["SliceSizes_nl"] = "SIZE [num]"; | |
| 514 | -ln["Latitude_nl"] = "LATITUDE"; | |
| 515 | -ln["Longitude_nl"] = "LONGITUDE"; | |
| 516 | -ln["BalloonContent_nl"] = "BALLOON CONTENT";// [opt] | |
| 517 | -ln["GEOJSON_nl"] = "GEOJSON"; | |
| 518 | -ln["BubbleContent_nl"] = "BUBBLE CONTENT"; | |
| 519 | -ln["BubbleSize_nl"] = "BUBBLE SIZE [num]"; | |
| 520 | -ln["Categories_nl"] = "CATEGORY [opt]"; | |
| 521 | - | |
| 522 | -//options | |
| 523 | -ln["title_nl"] = "Title" | |
| 524 | -ln["description_nl"] = "Description"; | |
| 525 | - | |
| 526 | -ln["x-axis-label_nl"] = "X Axis Label"; | |
| 527 | -ln["y-axis-label_nl"] = "Y Axis Label"; | |
| 528 | -ln["suffix_nl"] = "Tooltip Suffix"; | |
| 529 | -ln["theme_nl"] = "Theme"; | |
| 530 | -ln["stack_nl"] = "Stack"; | |
| 531 | -ln["donut_nl"] = "Donut"; | |
| 532 | - | |
| 533 | -ln["x-axis-label_description_nl"] = "X Axis Label"; | |
| 534 | -ln["y-axis-label_description_nl"] = "Y Axis Label"; | |
| 535 | -ln["suffix_description_nl"] = "Tooltip Suffix"; | |
| 536 | -ln["theme_description_nl"] = "Theme"; | |
| 537 | -ln["stack_description_nl"] = "Stack"; | |
| 538 | -ln["donut_description_nl"] = "Donut"; | |
| 539 | 197 | \ No newline at end of file |
| 198 | +ln["true_en"] = "Yes"; | |
| 199 | +ln["false_en"] = "No"; | |
| 200 | +ln["bottom_en"] = "Yes: Bottom"; | |
| 201 | +ln["topRight_en"] = "Yes: Top Right"; | |
| 202 | +ln["normal_en"] = "Yes: Normal"; | |
| 203 | +ln["percent_en"] = "Yes: Percent"; | |
| 204 | +ln["themeBase_en"] = "Base"; | |
| 205 | +ln["themeDarkUnika_en"] = "Dark Unika"; | |
| 206 | +ln["themeSandSignika_en"] = "Sand Signika"; | |
| 207 | +ln["themeGridLight_en"] = "Grid Light"; | |
| 208 | +ln["themeSpod_en"] = "Spod"; | |
| 209 | + | |
| 210 | +ln["x-axis-labelDescription_en"] = "The label shown on the X axis."; | |
| 211 | +ln["y-axis-labelDescription_en"] = "The label shown on the Y axis."; | |
| 212 | +ln["suffixDescription_en"] = "The suffix added to values ($,%, Kg, ...)."; | |
| 213 | +ln["legendDescription_en"] = "The leged position."; | |
| 214 | +ln["data-labelsDescription_en"] = "Show/hide data labels."; | |
| 215 | +ln["themeDescription_en"] = "The theme affects the appearance and colors of the chart."; | |
| 216 | +ln["stackDescription_en"] = "Stack type."; | |
| 217 | +ln["donutDescription_en"] = "If 'true' Pie will become Donut! :)."; | |
| 218 | + | |
| 219 | +///******** IT ********/ | |
| 220 | +// | |
| 221 | +////PAGE SLIDER | |
| 222 | +//ln["slide1Title_it"] = "SELEZIONA IL DATASET"; | |
| 223 | +//ln["slide1Subtitle_it"] = "Seleziona il dataset dalla lista o copia e incolla la url del dataset."; | |
| 224 | +//ln["slide2Title_it"] = "SELEZIONA I DATI"; | |
| 225 | +//ln["slide2Subtitle_it"] = "Seleziona i campi sulla sinistra. Nella tabella saranno mostrati i valori dei campi selezionati."; | |
| 226 | +//ln["slide3Title_it"] = "SELEZIONA LA VISUALIZZAZIONE"; | |
| 227 | +//ln["slide3Subtitle_it"] = "Seleziona una visualizzazione, inserisci dati di input ed etichette (opzionale)."; | |
| 228 | +//ln["back_it"] = "Indietro"; | |
| 229 | +//ln["forward_it"] = "Avanti"; | |
| 230 | +// | |
| 231 | +////SELECT DATASET | |
| 232 | +//ln["listView_it"] = "ELENCO"; | |
| 233 | +//ln["treeMapView_it"] = "GRAFICO AD ALBERO"; | |
| 234 | +//ln["extendedSearch_it"] = "RICERCA ESTESA"; | |
| 235 | +//ln["provider_it"] = "Provider"; | |
| 236 | +//ln["showing_it"] = "Visualizzati"; | |
| 237 | +//ln["to_it"] = "a"; | |
| 238 | +//ln["of_it"] = "di"; | |
| 239 | +//ln["datasets_it"] = "datasets"; | |
| 240 | +////ln["availableDatasets_it"] = "Dataset disponibili"; | |
| 241 | +//ln["suggestedDatasets_it"] = "Dataset suggeriti"; | |
| 242 | +//ln["selectedUrl_it"] = "Url selezionata"; | |
| 243 | +//ln["wrongUrl_it"] = "Url invalido o data provider non ancora supportato."; | |
| 244 | +// | |
| 245 | +////SELECT DATA | |
| 246 | +//ln["expertAddFilters_it"] = "ESPERTO : AGGIUNGI FILTRI"; | |
| 247 | +// | |
| 248 | +////select-fields | |
| 249 | +//ln["fields_it"] = "CAMPI"; | |
| 250 | +// | |
| 251 | +////data-table | |
| 252 | +//ln["selectedData_it"] = "DATI SELEZIONATI"; | |
| 253 | +//ln["rows_it"] = "righe"; | |
| 254 | +//ln["type_it"] = "TIPO"; | |
| 255 | +//ln["warning_it"] = "ATTENZIONE"; | |
| 256 | +// | |
| 257 | +////filters | |
| 258 | +//ln["filterField_it"] = "Campo"; | |
| 259 | +//ln["filterOperation_it"] = "Operazione"; | |
| 260 | +//ln["filterValue_it"] = "Valore"; | |
| 261 | +// | |
| 262 | +//ln["=_it"] = "รจ uguale a"; | |
| 263 | +//ln["!=_it"] = "รจ diverso da"; | |
| 264 | +//ln[">_it"] = "รจ maggiore di"; | |
| 265 | +//ln[">=_it"] = "รจ maggiore uguale di"; | |
| 266 | +//ln["<_it"] = "รจ minore di"; | |
| 267 | +//ln["<=_it"] = "รจ minore uguale di"; | |
| 268 | +//ln["contains_it"] = "contiene"; | |
| 269 | +//ln["notContains_it"] = "non contiene"; | |
| 270 | +//ln["start_it"] = "inizia con"; | |
| 271 | +//ln["ends_it"] = "finisce con"; | |
| 272 | +// | |
| 273 | +////SELECT VISUALIZATION | |
| 274 | +//ln["inputs_it"] = "DATI DI INPUT"; | |
| 275 | +//ln["baseInfo_it"] = "INFORMAZIONI DI BASE"; | |
| 276 | +//ln["layouts_it"] = "ETICHETTE / OPZIONI"; | |
| 277 | +//ln["dataletPreview_it"] = "ANTEPRIMA DELLA DATALET"; | |
| 278 | +//ln["addDatalet_it"] = "AGGIUNGI"; | |
| 279 | +//ln["modifyDatalet_it"] = "MODIFICA"; | |
| 280 | +// | |
| 281 | +////vslider | |
| 282 | +//ln["search_it"] = "Cerca"; | |
| 283 | +// | |
| 284 | +//ln["datatable_it"] = "Tabella"; | |
| 285 | +//ln["barchart_it"] = "Grafico a barre"; | |
| 286 | +//ln["columnchart_it"] = "Grafico a colonne"; | |
| 287 | +//ln["areachart_it"] = "Grafico ad area"; | |
| 288 | +//ln["linechart_it"] = "Grafico a linee"; | |
| 289 | +//ln["heatmap_it"] = "Mappa termica"; | |
| 290 | +//ln["barchart_stacked_it"] = "Grafico a barre in pila"; | |
| 291 | +//ln["columnchart_stacked_it"] = "Grafico a colonne in pila"; | |
| 292 | +//ln["areachart_stacked_it"] = "Grafico ad area in pila"; | |
| 293 | +//ln["piechart_it"] = "Grafico a torta"; | |
| 294 | +//ln["scatterchart_it"] = "Grafico a dispersione"; | |
| 295 | +//ln["bubblechart_it"] = "Grafico a bolle"; | |
| 296 | +//ln["treemap_it"] = "Grafico ad albero"; | |
| 297 | +//ln["leafletjs_it"] = "Mappa"; | |
| 298 | +//ln["leafletjs-geojson_it"] = "Mappa geojson"; | |
| 299 | +// | |
| 300 | +////inputs | |
| 301 | +//ln["expertGroupBy_it"] = "ESPERTO : RAGGRUPPA"; | |
| 302 | +// | |
| 303 | +//ln["sortAscending_it"] = "ordinamento crescente"; | |
| 304 | +//ln["sortDescending_it"] = "ordinamento decrescente"; | |
| 305 | +//ln["unsort_it"] = "non ordinato"; | |
| 306 | +// | |
| 307 | +//ln["groupBy_it"] = "RAGGRUPPA"; | |
| 308 | +//ln["calculate_it"] = "CALCOLA"; | |
| 309 | +// | |
| 310 | +//ln["COUNT_it"] = "CONTEGGIO di"; | |
| 311 | +//ln["SUM_it"] = "SOMMA di"; | |
| 312 | +//ln["MIN_it"] = "MINIMO di"; | |
| 313 | +//ln["MAX_it"] = "MASSIMO di"; | |
| 314 | +//ln["AVG_it"] = "MEDIA di"; | |
| 315 | +//ln["FIRST_it"] = "PRIMO di"; | |
| 316 | +//ln["LAST_it"] = "ULTIMO di"; | |
| 317 | +// | |
| 318 | +//ln["XAxis_it"] = "ASSE X"; | |
| 319 | +//ln["YAxis_it"] = "ASSE Y"; | |
| 320 | +//ln["NumericXAxis_it"] = "ASSE X [num]"; | |
| 321 | +//ln["NumericYAxis_it"] = "ASSE Y [num]"; | |
| 322 | +//ln["Column_it"] = "COLONNA"; | |
| 323 | +//ln["Level_it"] = "LIVELLO"; | |
| 324 | +//ln["SliceLabels_it"] = "ETICHETTA"; | |
| 325 | +//ln["SliceSizes_it"] = "DIMENSIONE [num]"; | |
| 326 | +//ln["Latitude_it"] = "LATITUDINE"; | |
| 327 | +//ln["Longitude_it"] = "LONGITUDINE"; | |
| 328 | +//ln["BalloonContent_it"] = "CONTENUTO"; | |
| 329 | +//ln["GEOJSON_it"] = "GEOJSON"; | |
| 330 | +//ln["BubbleContent_it"] = "CONTENUTO BOLLA"; | |
| 331 | +//ln["BubbleSize_it"] = "DIMENSIONE BOLLA [num]"; | |
| 332 | +//ln["Categories_it"] = "CATEGORIA [opt]"; | |
| 333 | +// | |
| 334 | +////options | |
| 335 | +//ln["title_it"] = "Titolo" | |
| 336 | +//ln["description_it"] = "Descrizione"; | |
| 337 | +// | |
| 338 | +//ln["x-axis-label_it"] = "Etichetta asse X"; | |
| 339 | +//ln["y-axis-label_it"] = "Etichetta asse Y"; | |
| 340 | +//ln["suffix_it"] = "Suffisso tooltip"; | |
| 341 | +//ln["theme_it"] = "Tema"; | |
| 342 | +//ln["stack_it"] = "Stack"; | |
| 343 | +//ln["donut_it"] = "Ciambella"; | |
| 344 | +// | |
| 345 | +//ln["x-axis-label_description_it"] = "L'etichetta che verrร visualizzata sull'asse delle X"; | |
| 346 | +//ln["y-axis-label_description_it"] = "L'etichetta che verrร visualizzata sull'asse delle Y"; | |
| 347 | +//ln["suffix_description_it"] = "Il suffisso che verrร aggiunto ai valori ($, %, Kg, ...)"; | |
| 348 | +//ln["theme_description_it"] = "Il tema influenza l'estetica e i colori del grafico"; | |
| 349 | +//ln["stack_description_it"] = "Se 'percent' sarร applicata la normalizzazione a 100"; | |
| 350 | +//ln["donut_description_it"] = "Se 'true' il grafico a torta diventerร a ciambella! :)"; | |
| 351 | +// | |
| 352 | +///******** FR ********/ | |
| 353 | +// | |
| 354 | +////PAGE SLIDER | |
| 355 | +//ln["slide1Title_fr"] = "SELECTIONNER UN JEU DE DONNEES"; | |
| 356 | +//ln["slide1Subtitle_fr"] = "Rechercher ou copier/coller lโurl du jeu de donnรฉes."; | |
| 357 | +//ln["slide2Title_fr"] = "SELECTIONNER DONNEES"; | |
| 358 | +//ln["slide2Subtitle_fr"] = "Sรฉlectionner les champs ร partir de lโarborescence. Une fenรชtre vous indiquera les valeurs relatives aux champs sรฉlectionnรฉs."; | |
| 359 | +//ln["slide3Title_fr"] = "SELECTIONNER UN MODE DE VISUALISATION"; | |
| 360 | +//ln["slide3Subtitle_fr"] = "Sรฉlectionner un mode de visualisation, remplir les entrรฉes et les vignettes (optionnel)."; | |
| 361 | +//ln["back_fr"] = "RETOUR"; | |
| 362 | +//ln["forward_fr"] = "AVANT"; | |
| 363 | +// | |
| 364 | +////SELECT DATASET | |
| 365 | +//ln["listView_fr"] = "VUE EN LISTE"; | |
| 366 | +//ln["treeMapView_fr"] = "VUE EN ARBORESCENCE"; | |
| 367 | +//ln["extendedSearch_fr"] = "EXTENDED SEARCH"; | |
| 368 | +//ln["provider_fr"] = "Provider"; | |
| 369 | +//ln["showing_fr"] = "Showing"; | |
| 370 | +//ln["to_fr"] = "to"; | |
| 371 | +//ln["of_fr"] = "of"; | |
| 372 | +//ln["datasets_fr"] = "datasets"; | |
| 373 | +////ln["availableDatasets_fr"] = "Jeux de donnรฉes disponibles"; | |
| 374 | +//ln["suggestedDatasets_fr"] = "Jeux de donnรฉes suggรฉrรฉs"; | |
| 375 | +//ln["selectedUrl_fr"] = "Sรฉlectionner URL"; | |
| 376 | +//ln["wrongUrl_fr"] = "Invalid url or data provider not supported yet."; | |
| 377 | +// | |
| 378 | +////SELECT DATA | |
| 379 | +//ln["expertAddFilters_fr"] = "EXPERT : ADD FILTERS"; | |
| 380 | +// | |
| 381 | +////select-fields | |
| 382 | +//ln["fields_fr"] = "FIELDS"; | |
| 383 | +// | |
| 384 | +////data-table | |
| 385 | +//ln["selectedData_fr"] = "SELECTED DATA"; | |
| 386 | +//ln["rows_fr"] = "rows"; | |
| 387 | +//ln["type_fr"] = "TYPE"; | |
| 388 | +//ln["warning_fr"] = "WARNING"; | |
| 389 | +// | |
| 390 | +////filters | |
| 391 | +//ln["filterField_fr"] = "Field"; | |
| 392 | +//ln["filterOperation_fr"] = "Operation"; | |
| 393 | +//ln["filterValue_fr"] = "Value"; | |
| 394 | +// | |
| 395 | +//ln["=_fr"] = "is equal to"; | |
| 396 | +//ln["!=_fr"] = "is different from"; | |
| 397 | +//ln[">_fr"] = "is greater than"; | |
| 398 | +//ln[">=_fr"] = "is greater than or equal to"; | |
| 399 | +//ln["<_fr"] = "is less than"; | |
| 400 | +//ln["<=_fr"] = "is less than or equal to"; | |
| 401 | +//ln["contains_fr"] = "contains"; | |
| 402 | +//ln["notContains_fr"] = "not contains"; | |
| 403 | +//ln["start_fr"] = "start with"; | |
| 404 | +//ln["ends_fr"] = "ends with"; | |
| 405 | +// | |
| 406 | +////SELECT VISUALIZATION | |
| 407 | +//ln["inputs_fr"] = "SORTIES"; | |
| 408 | +//ln["baseInfo_fr"] = "INFORMATION DE BASE"; | |
| 409 | +//ln["layouts_fr"] = "VIGNETTES/OPTIONSs"; | |
| 410 | +//ln["dataletPreview_fr"] = "PREVISUALISATION"; | |
| 411 | +//ln["addDatalet_fr"] = "AJOUTER"; | |
| 412 | +//ln["modifyDatalet_fr"] = "MODIFIER"; | |
| 413 | +// | |
| 414 | +////vslider | |
| 415 | +//ln["search_fr"] = "Search"; | |
| 416 | +// | |
| 417 | +//ln["datatable_fr"] = "Table"; | |
| 418 | +//ln["barchart_fr"] = "Bar"; | |
| 419 | +//ln["columnchart_fr"] = "Column"; | |
| 420 | +//ln["areachart_fr"] = "Area"; | |
| 421 | +//ln["linechart_fr"] = "Line"; | |
| 422 | +//ln["heatmap_fr"] = "Heat Map"; | |
| 423 | +//ln["barchart_stacked_fr"] = "Stacked Bar"; | |
| 424 | +//ln["columnchart_stacked_fr"] = "Stacked Column"; | |
| 425 | +//ln["areachart_stacked_fr"] = "Stacked Area"; | |
| 426 | +//ln["piechart_fr"] = "Pie"; | |
| 427 | +//ln["scatterchart_fr"] = "Scatter"; | |
| 428 | +//ln["bubblechart_fr"] = "Bubble"; | |
| 429 | +//ln["treemap_fr"] = "Tree Map"; | |
| 430 | +//ln["leafletjs_fr"] = "Map"; | |
| 431 | +//ln["leafletjs-geojson_fr"] = "Map Geojson"; | |
| 432 | +// | |
| 433 | +////inputs | |
| 434 | +//ln["expertGroupBy_fr"] = "EXPERT : GROUP BY"; | |
| 435 | +// | |
| 436 | +//ln["sortAscending_fr"] = "sorted ascending"; | |
| 437 | +//ln["sortDescending_fr"] = "sorted descending"; | |
| 438 | +//ln["unsort_fr"] = "unsorted"; | |
| 439 | +// | |
| 440 | +//ln["groupBy_fr"] = "GROUP BY"; | |
| 441 | +//ln["calculate_fr"] = "CALCULATE"; | |
| 442 | +// | |
| 443 | +//ln["COUNT_fr"] = "COUNT of"; | |
| 444 | +//ln["SUM_fr"] = "SUM of"; | |
| 445 | +//ln["MIN_fr"] = "MIN of"; | |
| 446 | +//ln["MAX_fr"] = "MAX of"; | |
| 447 | +//ln["AVG_fr"] = "AVG of"; | |
| 448 | +//ln["FIRST_fr"] = "FIRST of"; | |
| 449 | +//ln["LAST_fr"] = "LAST of"; | |
| 450 | +// | |
| 451 | +//ln["XAxis_fr"] = "X AXIS"; | |
| 452 | +//ln["YAxis_fr"] = "Y AXIS"; | |
| 453 | +//ln["NumericXAxis_fr"] = "X AXIS [num]"; | |
| 454 | +//ln["NumericYAxis_fr"] = "Y AXIS [num]"; | |
| 455 | +//ln["Column_fr"] = "COLUMN"; | |
| 456 | +//ln["Level_fr"] = "LEVEL"; | |
| 457 | +//ln["SliceLabels_fr"] = "LABEL"; | |
| 458 | +//ln["SliceSizes_fr"] = "SIZE [num]"; | |
| 459 | +//ln["Latitude_fr"] = "LATITUDE"; | |
| 460 | +//ln["Longitude_fr"] = "LONGITUDE"; | |
| 461 | +//ln["BalloonContent_fr"] = "BALLOON CONTENT";// [opt] | |
| 462 | +//ln["GEOJSON_fr"] = "GEOJSON"; | |
| 463 | +//ln["BubbleContent_fr"] = "BUBBLE CONTENT"; | |
| 464 | +//ln["BubbleSize_fr"] = "BUBBLE SIZE [num]"; | |
| 465 | +//ln["Categories_fr"] = "CATEGORY [opt]"; | |
| 466 | +// | |
| 467 | +////options | |
| 468 | +//ln["title_fr"] = "Title" | |
| 469 | +//ln["description_fr"] = "Description"; | |
| 470 | +// | |
| 471 | +//ln["x-axis-label_fr"] = "X Axis Label"; | |
| 472 | +//ln["y-axis-label_fr"] = "Y Axis Label"; | |
| 473 | +//ln["suffix_fr"] = "Tooltip Suffix"; | |
| 474 | +//ln["theme_fr"] = "Theme"; | |
| 475 | +//ln["stack_fr"] = "Stack"; | |
| 476 | +//ln["donut_fr"] = "Donut"; | |
| 477 | +// | |
| 478 | +//ln["x-axis-label_description_fr"] = "Vignette pour lโaxe X."; | |
| 479 | +//ln["y-axis-label_description_fr"] = "Vignette pour lโaxe Y."; | |
| 480 | +//ln["suffix_description_fr"] = "Unitรฉs de mesures (ex: dollars, euros."; | |
| 481 | +//ln["theme_description_fr"] = "Theme"; | |
| 482 | +//ln["stack_description_fr"] = "Stack"; | |
| 483 | +//ln["donut_description_fr"] = "Donut"; | |
| 484 | +// | |
| 485 | +///******** NL ********/ | |
| 486 | +// | |
| 487 | +////PAGE SLIDER | |
| 488 | +//ln["slide1Title_nl"] = "SELECTEER DATASET"; | |
| 489 | +//ln["slide1Subtitle_nl"] = "Zoek of kopieer en plak de url van de dataset."; | |
| 490 | +//ln["slide2Title_nl"] = "SELECTEER DATA"; | |
| 491 | +//ln["slide2Subtitle_nl"] = "Selecteer de velden uit de boomstructuur. De multi-tabel laat de waarden zien van de geselecteerde velden."; | |
| 492 | +//ln["slide3Title_nl"] = "SELECTEER VISUALISATIE"; | |
| 493 | +//ln["slide3Subtitle_nl"] = "Selecteer een visualisatie, vul de invoer en labels in."; | |
| 494 | +//ln["back_nl"] = "TERUG"; | |
| 495 | +//ln["forward_nl"] = "VOOTUIT"; | |
| 496 | +// | |
| 497 | +////SELECT DATASET | |
| 498 | +//ln["listView_nl"] = "LIJSTWEERGAVE"; | |
| 499 | +//ln["treeMapView_nl"] = "BOOMSTRUCTUUR WEEERGAVE"; | |
| 500 | +//ln["extendedSearch_nl"] = "EXTENDED SEARCH"; | |
| 501 | +//ln["provider_nl"] = "Provider"; | |
| 502 | +//ln["showing_nl"] = "Showing"; | |
| 503 | +//ln["to_nl"] = "to"; | |
| 504 | +//ln["of_nl"] = "of"; | |
| 505 | +//ln["datasets_nl"] = "datasets"; | |
| 506 | +////ln["availableDatasets_nl"] = "Beschikbare datasets"; | |
| 507 | +//ln["suggestedDatasets_nl"] = "Voeg aanbevolen datasets"; | |
| 508 | +//ln["selectedUrl_nl"] = "Selecteer url"; | |
| 509 | +//ln["wrongUrl_nl"] = "Ongeldige url of data provider nog niet ondersteund."; | |
| 510 | +// | |
| 511 | +////SELECT DATA | |
| 512 | +//ln["expertAddFilters_nl"] = "EXPERT : ADD FILTERS"; | |
| 513 | +// | |
| 514 | +////select-fields | |
| 515 | +//ln["fields_nl"] = "FIELDS"; | |
| 516 | +// | |
| 517 | +////data-table | |
| 518 | +//ln["selectedData_nl"] = "SELECTED DATA"; | |
| 519 | +//ln["rows_nl"] = "rows"; | |
| 520 | +//ln["type_nl"] = "TYPE"; | |
| 521 | +//ln["warning_nl"] = "WARNING"; | |
| 522 | +// | |
| 523 | +////filters | |
| 524 | +//ln["filterField_nl"] = "Field"; | |
| 525 | +//ln["filterOperation_nl"] = "Operation"; | |
| 526 | +//ln["filterValue_nl"] = "Value"; | |
| 527 | +// | |
| 528 | +//ln["=_nl"] = "is equal to"; | |
| 529 | +//ln["!=_nl"] = "is different from"; | |
| 530 | +//ln[">_nl"] = "is greater than"; | |
| 531 | +//ln[">=_nl"] = "is greater than or equal to"; | |
| 532 | +//ln["<_nl"] = "is less than"; | |
| 533 | +//ln["<=_nl"] = "is less than or equal to"; | |
| 534 | +//ln["contains_nl"] = "contains"; | |
| 535 | +//ln["notContains_nl"] = "not contains"; | |
| 536 | +//ln["start_nl"] = "start with"; | |
| 537 | +//ln["ends_nl"] = "ends with"; | |
| 538 | +// | |
| 539 | +////SELECT VISUALIZATION | |
| 540 | +//ln["inputs_nl"] = "INPUTS"; | |
| 541 | +//ln["baseInfo_nl"] = "BASIS INFO"; | |
| 542 | +//ln["layouts_nl"] = "LABELS / OPTIES"; | |
| 543 | +//ln["dataletPreview_nl"] = "VOORBEELD"; | |
| 544 | +//ln["addDatalet_nl"] = "TOEVOEGEN"; | |
| 545 | +//ln["modifyDatalet_nl"] = "WIJZIGEN"; | |
| 546 | +// | |
| 547 | +////vslider | |
| 548 | +//ln["search_nl"] = "Search"; | |
| 549 | +// | |
| 550 | +//ln["datatable_nl"] = "Tafel"; | |
| 551 | +//ln["barchart_nl"] = "Bar"; | |
| 552 | +//ln["columnchart_nl"] = "Column"; | |
| 553 | +//ln["areachart_nl"] = "Area"; | |
| 554 | +//ln["linechart_nl"] = "Line"; | |
| 555 | +//ln["heatmap_nl"] = "Heat Map"; | |
| 556 | +//ln["barchart_stacked_nl"] = "Stacked Bar"; | |
| 557 | +//ln["columnchart_stacked_nl"] = "Stacked Column"; | |
| 558 | +//ln["areachart_stacked_nl"] = "Stacked Area"; | |
| 559 | +//ln["piechart_nl"] = "Pie"; | |
| 560 | +//ln["scatterchart_nl"] = "Scatter"; | |
| 561 | +//ln["bubblechart_nl"] = "Bubble"; | |
| 562 | +//ln["treemap_nl"] = "Tree Map"; | |
| 563 | +//ln["leafletjs_nl"] = "Map"; | |
| 564 | +//ln["leafletjs-geojson_nl"] = "Map Geojson"; | |
| 565 | +// | |
| 566 | +////inputs | |
| 567 | +//ln["expertGroupBy_nl"] = "EXPERT : GROUP BY"; | |
| 568 | +// | |
| 569 | +//ln["sortAscending_nl"] = "sorted ascending"; | |
| 570 | +//ln["sortDescending_nl"] = "sorted descending"; | |
| 571 | +//ln["unsort_nl"] = "unsorted"; | |
| 572 | +// | |
| 573 | +//ln["groupBy_nl"] = "GROUP BY"; | |
| 574 | +//ln["calculate_nl"] = "CALCULATE"; | |
| 575 | +// | |
| 576 | +//ln["COUNT_nl"] = "COUNT of"; | |
| 577 | +//ln["SUM_nl"] = "SUM of"; | |
| 578 | +//ln["MIN_nl"] = "MIN of"; | |
| 579 | +//ln["MAX_nl"] = "MAX of"; | |
| 580 | +//ln["AVG_nl"] = "AVG of"; | |
| 581 | +//ln["FIRST_nl"] = "FIRST of"; | |
| 582 | +//ln["LAST_nl"] = "LAST of"; | |
| 583 | +// | |
| 584 | +//ln["XAxis_nl"] = "X AXIS"; | |
| 585 | +//ln["YAxis_nl"] = "Y AXIS"; | |
| 586 | +//ln["NumericXAxis_nl"] = "X AXIS [num]"; | |
| 587 | +//ln["NumericYAxis_nl"] = "Y AXIS [num]"; | |
| 588 | +//ln["Column_nl"] = "COLUMN"; | |
| 589 | +//ln["Level_nl"] = "LEVEL"; | |
| 590 | +//ln["SliceLabels_nl"] = "LABEL"; | |
| 591 | +//ln["SliceSizes_nl"] = "SIZE [num]"; | |
| 592 | +//ln["Latitude_nl"] = "LATITUDE"; | |
| 593 | +//ln["Longitude_nl"] = "LONGITUDE"; | |
| 594 | +//ln["BalloonContent_nl"] = "BALLOON CONTENT";// [opt] | |
| 595 | +//ln["GEOJSON_nl"] = "GEOJSON"; | |
| 596 | +//ln["BubbleContent_nl"] = "BUBBLE CONTENT"; | |
| 597 | +//ln["BubbleSize_nl"] = "BUBBLE SIZE [num]"; | |
| 598 | +//ln["Categories_nl"] = "CATEGORY [opt]"; | |
| 599 | +// | |
| 600 | +////options | |
| 601 | +//ln["title_nl"] = "Title" | |
| 602 | +//ln["description_nl"] = "Description"; | |
| 603 | +// | |
| 604 | +//ln["x-axis-label_nl"] = "X Axis Label"; | |
| 605 | +//ln["y-axis-label_nl"] = "Y Axis Label"; | |
| 606 | +//ln["suffix_nl"] = "Tooltip Suffix"; | |
| 607 | +//ln["theme_nl"] = "Theme"; | |
| 608 | +//ln["stack_nl"] = "Stack"; | |
| 609 | +//ln["donut_nl"] = "Donut"; | |
| 610 | +// | |
| 611 | +//ln["x-axis-label_description_nl"] = "X Axis Label"; | |
| 612 | +//ln["y-axis-label_description_nl"] = "Y Axis Label"; | |
| 613 | +//ln["suffix_description_nl"] = "Tooltip Suffix"; | |
| 614 | +//ln["theme_description_nl"] = "Theme"; | |
| 615 | +//ln["stack_description_nl"] = "Stack"; | |
| 616 | +//ln["donut_description_nl"] = "Donut"; | |
| 540 | 617 | \ No newline at end of file | ... | ... |