diff --git a/controllets/datalet-selection-controllet/datalet-selection-controllet.html b/controllets/datalet-selection-controllet/datalet-selection-controllet.html index 7dc9018..0f18b80 100755 --- a/controllets/datalet-selection-controllet/datalet-selection-controllet.html +++ b/controllets/datalet-selection-controllet/datalet-selection-controllet.html @@ -360,8 +360,7 @@ listeners: { 'items-vslider-controllet_selected-datalet': '_selectDatalet', // 'tree-view-controllet_selected-fields': '_updateSelectedFields' - 'change': '_loadDataletBlur' - //change name + 'change': '_paramsChanged' }, ready : function() {//console.log(this.dataletPreset); @@ -504,27 +503,28 @@ } if(load){ -// var labels = this.$.datalet_selection_labels.querySelectorAll("paper-textarea"); -// for (var i = 0; i < labels.length; i++) { -// if (labels[i].innerHTML.trim() != "") { -// this.params[labels[i].label] = labels[i].value; -// } -// } this.loadPreview = true this._loadDatalet(selectedFields); } }, - _loadDataletBlur : function(e){//da eliminare + _updateParams : function(){ var labels = this.$.datalet_selection_labels.querySelectorAll("paper-textarea"); - for (var i = 0; i < labels.length; i++) - this.params[labels[i].label] = labels[i].value; + this.params[labels[0].label] = labels[0].value; + + if(!labels[0].value) + this.params[labels[0].label] = ""; var labels = this.$.datalet_selection_labels.querySelectorAll("paper-input"); for (var i = 0; i < labels.length; i++) this.params[labels[i].label] = labels[i].value; + }, + + _paramsChanged : function(){ + + this._updateParams(); if(this.$.datalet_selection_datalet_placeholder.children[1]) this.$.datalet_selection_datalet_placeholder.children[1].behavior.setParameters(this.params); @@ -532,20 +532,7 @@ _loadDatalet : function(selectedFields){ - var labels = this.$.datalet_selection_labels.querySelectorAll("paper-textarea"); - for (var i = 0; i < labels.length; i++) { -// if (labels[i].innerHTML.trim() != "") { - this.params[labels[i].label] = labels[i].value; -// } - } - - var labels = this.$.datalet_selection_labels.querySelectorAll("paper-input"); - for (var i = 0; i < labels.length; i++) { -// if (labels[i].innerHTML.trim() != "") { - this.params[labels[i].label] = labels[i].value; -// } - } - + this._updateParams(); var dataletParams ={ component : this.selectedDatalet+"-datalet", @@ -567,6 +554,7 @@ if(this.selectedFields[i]) selectedFields.push(this.selectedFields[i]); + console.log(this.params); var data = { dataUrl : this.dataUrl, diff --git a/datalets/areachart-datalet/areachart-datalet.html b/datalets/areachart-datalet/areachart-datalet.html index 07ef9f6..eef7fcf 100755 --- a/datalets/areachart-datalet/areachart-datalet.html +++ b/datalets/areachart-datalet/areachart-datalet.html @@ -141,17 +141,6 @@ Example: value: "" }, /** - * It's the title of the chart - * - * @attribute title - * @type Strig - * @default '' - */ - title: { - type: String, - value: "Heading" - }, - /** * It's the values suffix * * @attribute suffix @@ -171,7 +160,7 @@ Example: */ ready: function(){ this.behavior = $.extend(true, {}, HighchartsComponentBehavior, AreachartBehavior); - this.async(function(){this.behavior.init(this)},1000); + this.async(function(){this.behavior.init(this)},0); } }); diff --git a/datalets/barchart-datalet/barchart-datalet.html b/datalets/barchart-datalet/barchart-datalet.html index ed5632c..46cc321 100755 --- a/datalets/barchart-datalet/barchart-datalet.html +++ b/datalets/barchart-datalet/barchart-datalet.html @@ -56,23 +56,6 @@ Example: var BarchartBehavior = { - - setParameters: function(params) - { - //"description\":\"d\",\"title\":\"coseeee\",\"x-axis-label\":\"x\",\"y-axis-label\":\"y\",\"suffix\":\"e\"}' - this._component.chart.setTitle({text: params.title}); - this._component.chart.xAxis[0].setTitle({text: params['x-axis-label']}); - this._component.chart.yAxis[0].setTitle({text: params['y-axis-label']}); - - - /*this._component.chart.tooltip.options.formatter = function() { - $.each(this.points,function(){ - console.log(this.points); - }); - return 'a'; - }*/ - }, - /** * Bluid Highchart object * @@ -131,7 +114,6 @@ Example: series: this.properties.series.value }); - this._component.chart = $(this._component.$.charts.$.container).highcharts(); } }; @@ -163,17 +145,6 @@ Example: value: "" }, /** - * It's the title of the chart - * - * @attribute title - * @type Strig - * @default '' - */ - title: { - type: String, - value: "Heading" - }, - /** * It's the values suffix * * @attribute suffix @@ -194,18 +165,8 @@ Example: behavior : { type : Object, value : {} - }, - /** - * It's the component chart - * - * @attribute chart - * @type Object - * @default {} - */ - chart : { - type : Object, - value : {} } + }, /** @@ -217,7 +178,7 @@ Example: ready: function(){ this.behavior = $.extend(true, {}, HighchartsComponentBehavior, BarchartBehavior); - this.async(function(){this.behavior.init(this)},1000); + this.async(function(){this.behavior.init(this)},0); } }); diff --git a/datalets/base-datalet/base-datalet.html b/datalets/base-datalet/base-datalet.html index 82ea08e..2b81006 100755 --- a/datalets/base-datalet/base-datalet.html +++ b/datalets/base-datalet/base-datalet.html @@ -81,21 +81,18 @@ Example : width: 32px; } #base_datalet_spin { - height:256px; - width: 256px; - position: relative; - center: center; + height:64px; width: 100%; + /*position: relative;*/ + /*center: center;*/ }
- +
- - Source: (dataset) @@ -103,10 +100,9 @@ Example :
Powered by ROUTE-TO-PA
+ - - diff --git a/datalets/bubble3d-datalet/bubble3d-datalet.html b/datalets/bubble3d-datalet/bubble3d-datalet.html index 86abae4..7553fb5 100755 --- a/datalets/bubble3d-datalet/bubble3d-datalet.html +++ b/datalets/bubble3d-datalet/bubble3d-datalet.html @@ -226,17 +226,6 @@ Examples: value: "" }, /** - * It's the title of the chart - * - * @attribute title - * @type Strig - * @default '' - */ - title: { - type: String, - value: "" - }, - /** * It's the component behavior * * @attribute behavior @@ -256,7 +245,7 @@ Examples: */ ready: function(){ this.behavior = $.extend(true, {}, HighchartsComponentBehavior, Bubble3dBehavior); - this.async(function(){this.behavior.init(this)},1); + this.async(function(){this.behavior.init(this)},0); } }); diff --git a/datalets/column3Dchart-datalet/column3Dchart-datalet.html b/datalets/column3Dchart-datalet/column3Dchart-datalet.html index bb6ae89..64906a3 100755 --- a/datalets/column3Dchart-datalet/column3Dchart-datalet.html +++ b/datalets/column3Dchart-datalet/column3Dchart-datalet.html @@ -2,7 +2,7 @@ @license The MIT License (MIT) - Copyright (c) 2015 Dipartimento di Informatica - Universit di Salerno - Italy + Copyright (c) 2015 Dipartimento di Informatica - Universit� di Salerno - Italy Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -156,17 +156,6 @@ Example: value: "" }, /** - * It's the title of the chart - * - * @attribute title - * @type Strig - * @default '' - */ - title: { - type: String, - value: "Heading" - }, - /** * It's the component behavior * * @attribute behavior @@ -187,7 +176,7 @@ Example: */ ready: function(){ this.behavior = $.extend(true, {}, HighchartsComponentBehavior, column3DchartBehavior); - this.async(function(){this.behavior.init(this)},1000); + this.async(function(){this.behavior.init(this)},0); } }); diff --git a/datalets/columnchart-datalet/columnchart-datalet.html b/datalets/columnchart-datalet/columnchart-datalet.html index 2f37db2..4075938 100755 --- a/datalets/columnchart-datalet/columnchart-datalet.html +++ b/datalets/columnchart-datalet/columnchart-datalet.html @@ -2,7 +2,7 @@ @license The MIT License (MIT) - Copyright (c) 2015 Dipartimento di Informatica - Universit di Salerno - Italy + Copyright (c) 2015 Dipartimento di Informatica - Universit� di Salerno - Italy Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -144,17 +144,6 @@ Example: value: "" }, /** - * It's the title of the chart - * - * @attribute title - * @type Strig - * @default '' - */ - title: { - type: String, - value: "Heading" - }, - /** * It's the values suffix * * @attribute suffix @@ -186,7 +175,7 @@ Example: */ ready: function(){ this.behavior = $.extend(true, {}, HighchartsComponentBehavior, ColumnchartBehavior); - this.async(function(){this.behavior.init(this)},1000); + this.async(function(){this.behavior.init(this)},0); } }); diff --git a/datalets/datasetexplorer-datalet/datasetexplorer-datalet.html b/datalets/datasetexplorer-datalet/datasetexplorer-datalet.html index ea88002..fc1374d 100755 --- a/datalets/datasetexplorer-datalet/datasetexplorer-datalet.html +++ b/datalets/datasetexplorer-datalet/datasetexplorer-datalet.html @@ -128,7 +128,7 @@ Example: transformData: function(e) { var treemapData = []; - DatasetexplorerBehavior.map.name = this._component.name; + DatasetexplorerBehavior.map.name = this._component.title; if(this.data.length > 1) { for (i = 0; i < this.data.length; i++) { @@ -202,17 +202,6 @@ Example: properties: { /** - * It's the name for treemap - * - * @attribute name - * @type String - * @default '' - */ - name: { - type: String, - value: "" - }, - /** * It's the component behavior * * @attribute behavior diff --git a/datalets/datatable-datalet/datatable-datalet.html b/datalets/datatable-datalet/datatable-datalet.html index daa0371..b0d386a 100755 --- a/datalets/datatable-datalet/datatable-datalet.html +++ b/datalets/datatable-datalet/datatable-datalet.html @@ -134,7 +134,7 @@ Example: ready: function(){ this.behavior = $.extend(true, {}, BaseDataletBehavior, WorkcycleBehavior, AjaxJsonJsonPathBehavior, DatatableBehavior); - this.async(function(){this.behavior.init(this)},1000); + this.async(function(){this.behavior.init(this)},0); } }); diff --git a/datalets/donutpie3dchart-datalet/donutpie3dchart-datalet.html b/datalets/donutpie3dchart-datalet/donutpie3dchart-datalet.html index e84d504..d58203d 100755 --- a/datalets/donutpie3dchart-datalet/donutpie3dchart-datalet.html +++ b/datalets/donutpie3dchart-datalet/donutpie3dchart-datalet.html @@ -124,17 +124,6 @@ Example: behavior : { type : Object, value : {} - }, - /** - * It's the title of the chart - * - * @attribute title - * @type Strig - * @default '' - */ - title: { - type: String, - value: "" } }, @@ -146,7 +135,7 @@ Example: */ ready: function(){ this.behavior = $.extend(true, {}, HighchartsComponentBehavior, DonutPiechartBehavior); - this.async(function(){this.behavior.init(this)},1000); + this.async(function(){this.behavior.init(this)},0); } }); diff --git a/datalets/highcharts-datalet/highcharts-datalet.html b/datalets/highcharts-datalet/highcharts-datalet.html index 6cd5740..4a13e2e 100755 --- a/datalets/highcharts-datalet/highcharts-datalet.html +++ b/datalets/highcharts-datalet/highcharts-datalet.html @@ -2,7 +2,7 @@ @license The MIT License (MIT) - Copyright (c) 2015 Dipartimento di Informatica - Universit di Salerno - Italy + Copyright (c) 2015 Dipartimento di Informatica - Universit� di Salerno - Italy Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -133,7 +133,21 @@ Example : this.properties.series.value.push(this.data[i]); } - } + }, + + setParameters: function(params) + { + var chart = $(this._component.$.charts.$.container).highcharts(); + + chart.setTitle({text: params['title']}); + chart.xAxis[0].setTitle({text: params['x-axis-label']}); + chart.yAxis[0].setTitle({text: params['y-axis-label']}); + + chart.tooltip.options.formatter = function() { + return this.x + '

' + this.series.name + ': ' + this.y + ' ' + params['suffix'] + ''; + } + + }, }; var HighchartsComponentBehavior = $.extend(true, {}, BaseDataletBehavior, WorkcycleBehavior, AjaxJsonJsonPathBehavior, HighchartsBehavior); diff --git a/datalets/leafletjs-datalet/leafletjs-datalet.html b/datalets/leafletjs-datalet/leafletjs-datalet.html index c6c82a3..3510663 100755 --- a/datalets/leafletjs-datalet/leafletjs-datalet.html +++ b/datalets/leafletjs-datalet/leafletjs-datalet.html @@ -160,7 +160,7 @@ Example: L.Icon.Default.imagePath = 'http://services.routetopa.eu/DEEalerProvider/COMPONENTS/datalets/leafletjs-datalet/leafletsjs/images'; this.behavior = $.extend(true, {}, BaseDataletBehavior, WorkcycleBehavior, AjaxJsonJsonPathBehavior, leafletjsBehavior); - this.async(function(){this.behavior.init(this)},1000); + this.async(function(){this.behavior.init(this)},0); } }); diff --git a/datalets/linechart-datalet/linechart-datalet.html b/datalets/linechart-datalet/linechart-datalet.html index 78317a1..c5fe4d5 100755 --- a/datalets/linechart-datalet/linechart-datalet.html +++ b/datalets/linechart-datalet/linechart-datalet.html @@ -2,7 +2,7 @@ @license The MIT License (MIT) - Copyright (c) 2015 Dipartimento di Informatica - Universit di Salerno - Italy + Copyright (c) 2015 Dipartimento di Informatica - Universit� di Salerno - Italy Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -136,17 +136,6 @@ Example: value: "" }, /** - * It's the title of the chart - * - * @attribute title - * @type Strig - * @default '' - */ - title: { - type: String, - value: "Heading" - }, - /** * It's the values suffix * * @attribute suffix @@ -178,7 +167,7 @@ Example: */ ready: function(){ this.behavior = $.extend(true, {}, HighchartsComponentBehavior, LinechartBehavior); - this.async(function(){this.behavior.init(this)},1000); + this.async(function(){this.behavior.init(this)},0); } }); diff --git a/datalets/piechart-datalet/piechart-datalet.html b/datalets/piechart-datalet/piechart-datalet.html index 0d79b7a..956f19c 100755 --- a/datalets/piechart-datalet/piechart-datalet.html +++ b/datalets/piechart-datalet/piechart-datalet.html @@ -121,17 +121,6 @@ Example: behavior : { type : Object, value : {} - }, - /** - * It's the title of the chart - * - * @attribute title - * @type Strig - * @default '' - */ - title: { - type: String, - value: "" } }, @@ -143,7 +132,7 @@ Example: */ ready: function(){ this.behavior = $.extend(true, {}, HighchartsComponentBehavior, PiechartBehavior); - this.async(function(){this.behavior.init(this)},1000); + this.async(function(){this.behavior.init(this)},0); } }); diff --git a/datalets/treemap-datalet/treemap-datalet.html b/datalets/treemap-datalet/treemap-datalet.html index c49a115..b19927c 100755 --- a/datalets/treemap-datalet/treemap-datalet.html +++ b/datalets/treemap-datalet/treemap-datalet.html @@ -189,17 +189,6 @@ Example: properties: { /** - * It's the name for treemap - * - * @attribute name - * @type String - * @default '' - */ - title: { - type: String, - value: "" - }, - /** * It's the component behavior * * @attribute behavior @@ -214,7 +203,7 @@ Example: ready: function(){ this.behavior = $.extend(true, {}, BaseDataletBehavior, WorkcycleBehavior, AjaxJsonJsonPathBehavior, TreemapBehavior); - this.async(function(){this.behavior.init(this)},1000); + this.async(function(){this.behavior.init(this)},0); } });