diff --git a/datalets/areachart-datalet/areachart-datalet.html b/datalets/areachart-datalet/areachart-datalet.html index f3939d7..f116348 100755 --- a/datalets/areachart-datalet/areachart-datalet.html +++ b/datalets/areachart-datalet/areachart-datalet.html @@ -62,6 +62,13 @@ Example: * @method transformData */ presentData: function(){ + var min = 0; + for (var i in this.properties.series.value) { + min = Math.min(Math.min.apply(Math, this.properties.series.value[i].data), min); + } + if(min < 0) + min--; + options = { chart: { type: 'area', @@ -77,7 +84,7 @@ Example: } }, yAxis: { - min: 0, + min: min, title: { text: this._component.yAxisLabel, } diff --git a/datalets/barchart-datalet/barchart-datalet.html b/datalets/barchart-datalet/barchart-datalet.html index 4c5bb73..27d0b60 100755 --- a/datalets/barchart-datalet/barchart-datalet.html +++ b/datalets/barchart-datalet/barchart-datalet.html @@ -62,6 +62,13 @@ Example: * @method transformData */ presentData: function(){ + var min = 0; + for (var i in this.properties.series.value) { + min = Math.min(Math.min.apply(Math, this.properties.series.value[i].data), min); + } + if(min < 0) + min--; + options = { chart: { type: 'bar', @@ -77,7 +84,7 @@ Example: } }, yAxis: { - min: 0, + min: min, title: { text: this._component.yAxisLabel, } diff --git a/datalets/base-ajax-json-alasql-datalet/static/js/AjaxJsonAlasqlBehavior.js b/datalets/base-ajax-json-alasql-datalet/static/js/AjaxJsonAlasqlBehavior.js index 1734744..78c97ba 100755 --- a/datalets/base-ajax-json-alasql-datalet/static/js/AjaxJsonAlasqlBehavior.js +++ b/datalets/base-ajax-json-alasql-datalet/static/js/AjaxJsonAlasqlBehavior.js @@ -100,22 +100,27 @@ var AjaxJsonAlasqlBehavior = { var aggregators = JSON.parse(this._component.getAttribute("aggregators")); var orders = JSON.parse(this._component.getAttribute("orders")); - this._component.fields = JSON.parse(this._component.fields); /*deprecated*/ - if(selectedFields) { /*if deprecated*/ - this._component.fields = []; /*deprecated*/ - for (var i=0; i < selectedFields.length; i++) - if (selectedFields[i]) - this._component.fields.push(selectedFields[i].value); - } - - var fields = this._component.fields; - - //preview my space ? - if(filters && filters[0] && filters[0].constructor == Array){ - filters = filters[0]; - aggregators = aggregators[0]; - orders = orders[0]; - } + //this._component.fields = JSON.parse(this._component.fields); /*deprecated*/ + //if(selectedFields) { /*if deprecated*/ + // this._component.fields = []; /*deprecated*/ + // for (var i=0; i < selectedFields.length; i++) + // if (selectedFields[i]) + // this._component.fields.push(selectedFields[i].value); + //} + // + //var fields = this._component.fields; + + fields = []; + for (var i=0; i < selectedFields.length; i++) + if (selectedFields[i]) + fields.push(selectedFields[i].value); + + ////preview my space ? + //if(filters && filters[0] && filters[0].constructor == Array){ + // filters = filters[0]; + // aggregators = aggregators[0]; + // orders = orders[0]; + //} var converter = new DataTypeConverter(); var data = []; diff --git a/datalets/base-datalet/static/js/WorkcycleBehavior.js b/datalets/base-datalet/static/js/WorkcycleBehavior.js index b15358a..2405bf2 100755 --- a/datalets/base-datalet/static/js/WorkcycleBehavior.js +++ b/datalets/base-datalet/static/js/WorkcycleBehavior.js @@ -102,7 +102,7 @@ var WorkcycleBehavior = { that.presentData(); $(that._component).find("base-datalet")[0].removeLoader(); that.redraw(); - }, 300); + }, 600); }, /** diff --git a/datalets/columnchart-datalet/columnchart-datalet.html b/datalets/columnchart-datalet/columnchart-datalet.html index 4e0900a..1822ca8 100755 --- a/datalets/columnchart-datalet/columnchart-datalet.html +++ b/datalets/columnchart-datalet/columnchart-datalet.html @@ -63,6 +63,13 @@ Example: * @method transformData */ presentData: function(){ + var min = 0; + for (var i in this.properties.series.value) { + min = Math.min(Math.min.apply(Math, this.properties.series.value[i].data), min); + } + if(min < 0) + min--; + options = { chart: { type: 'column', @@ -78,7 +85,7 @@ Example: } }, yAxis: { - min: 0, + min: min, title: { text: this._component.yAxisLabel, } diff --git a/datalets/linechart-datalet/linechart-datalet.html b/datalets/linechart-datalet/linechart-datalet.html index b625dfd..65bda60 100755 --- a/datalets/linechart-datalet/linechart-datalet.html +++ b/datalets/linechart-datalet/linechart-datalet.html @@ -62,6 +62,13 @@ Example: * @method presentData */ presentData: function(){ + var min = 0; + for (var i in this.properties.series.value) { + min = Math.min(Math.min.apply(Math, this.properties.series.value[i].data), min); + } + if(min < 0) + min--; + options = { chart: { zoomType: 'xy' @@ -76,7 +83,7 @@ Example: } }, yAxis: { - min: 0, + min: min, title: { text: this._component.yAxisLabel, } diff --git a/locales/controllet_ln.js b/locales/controllet_ln.js index 4ae5667..b52e879 100755 --- a/locales/controllet_ln.js +++ b/locales/controllet_ln.js @@ -21,7 +21,7 @@ ln["selectedUrl_en"] = "Selected url"; ln["wrongUrl_en"] = "Invalid url or data provider not supported yet."; ln["providersDatasets_en"] = "PROVIDERS DATASETS"; -ln["spodUsersDatasets_en"] = "SPOD USERS DATASETS"; +ln["spodUsersDatasets_en"] = "COCREATED DATASETS"; ln["datasets_en"] = "DATASETS LIST"; ln["provider_en"] = "Provider";