Commit 92c924ed0a83f8e45397ef5fb8268a4765d5d165
1 parent
80d6c279
delay600, ALA-NO-FIELDS, highchart MIN
Showing
7 changed files
with
55 additions
and
22 deletions
datalets/areachart-datalet/areachart-datalet.html
@@ -62,6 +62,13 @@ Example: | @@ -62,6 +62,13 @@ Example: | ||
62 | * @method transformData | 62 | * @method transformData |
63 | */ | 63 | */ |
64 | presentData: function(){ | 64 | presentData: function(){ |
65 | + var min = 0; | ||
66 | + for (var i in this.properties.series.value) { | ||
67 | + min = Math.min(Math.min.apply(Math, this.properties.series.value[i].data), min); | ||
68 | + } | ||
69 | + if(min < 0) | ||
70 | + min--; | ||
71 | + | ||
65 | options = { | 72 | options = { |
66 | chart: { | 73 | chart: { |
67 | type: 'area', | 74 | type: 'area', |
@@ -77,7 +84,7 @@ Example: | @@ -77,7 +84,7 @@ Example: | ||
77 | } | 84 | } |
78 | }, | 85 | }, |
79 | yAxis: { | 86 | yAxis: { |
80 | - min: 0, | 87 | + min: min, |
81 | title: { | 88 | title: { |
82 | text: this._component.yAxisLabel, | 89 | text: this._component.yAxisLabel, |
83 | } | 90 | } |
datalets/barchart-datalet/barchart-datalet.html
@@ -62,6 +62,13 @@ Example: | @@ -62,6 +62,13 @@ Example: | ||
62 | * @method transformData | 62 | * @method transformData |
63 | */ | 63 | */ |
64 | presentData: function(){ | 64 | presentData: function(){ |
65 | + var min = 0; | ||
66 | + for (var i in this.properties.series.value) { | ||
67 | + min = Math.min(Math.min.apply(Math, this.properties.series.value[i].data), min); | ||
68 | + } | ||
69 | + if(min < 0) | ||
70 | + min--; | ||
71 | + | ||
65 | options = { | 72 | options = { |
66 | chart: { | 73 | chart: { |
67 | type: 'bar', | 74 | type: 'bar', |
@@ -77,7 +84,7 @@ Example: | @@ -77,7 +84,7 @@ Example: | ||
77 | } | 84 | } |
78 | }, | 85 | }, |
79 | yAxis: { | 86 | yAxis: { |
80 | - min: 0, | 87 | + min: min, |
81 | title: { | 88 | title: { |
82 | text: this._component.yAxisLabel, | 89 | text: this._component.yAxisLabel, |
83 | } | 90 | } |
datalets/base-ajax-json-alasql-datalet/static/js/AjaxJsonAlasqlBehavior.js
@@ -100,22 +100,27 @@ var AjaxJsonAlasqlBehavior = { | @@ -100,22 +100,27 @@ var AjaxJsonAlasqlBehavior = { | ||
100 | var aggregators = JSON.parse(this._component.getAttribute("aggregators")); | 100 | var aggregators = JSON.parse(this._component.getAttribute("aggregators")); |
101 | var orders = JSON.parse(this._component.getAttribute("orders")); | 101 | var orders = JSON.parse(this._component.getAttribute("orders")); |
102 | 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 | - | ||
113 | - //preview my space ? | ||
114 | - if(filters && filters[0] && filters[0].constructor == Array){ | ||
115 | - filters = filters[0]; | ||
116 | - aggregators = aggregators[0]; | ||
117 | - orders = orders[0]; | ||
118 | - } | 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 | + | ||
113 | + fields = []; | ||
114 | + for (var i=0; i < selectedFields.length; i++) | ||
115 | + if (selectedFields[i]) | ||
116 | + fields.push(selectedFields[i].value); | ||
117 | + | ||
118 | + ////preview my space ? | ||
119 | + //if(filters && filters[0] && filters[0].constructor == Array){ | ||
120 | + // filters = filters[0]; | ||
121 | + // aggregators = aggregators[0]; | ||
122 | + // orders = orders[0]; | ||
123 | + //} | ||
119 | 124 | ||
120 | var converter = new DataTypeConverter(); | 125 | var converter = new DataTypeConverter(); |
121 | var data = []; | 126 | var data = []; |
datalets/base-datalet/static/js/WorkcycleBehavior.js
@@ -102,7 +102,7 @@ var WorkcycleBehavior = { | @@ -102,7 +102,7 @@ var WorkcycleBehavior = { | ||
102 | that.presentData(); | 102 | that.presentData(); |
103 | $(that._component).find("base-datalet")[0].removeLoader(); | 103 | $(that._component).find("base-datalet")[0].removeLoader(); |
104 | that.redraw(); | 104 | that.redraw(); |
105 | - }, 300); | 105 | + }, 600); |
106 | }, | 106 | }, |
107 | 107 | ||
108 | /** | 108 | /** |
datalets/columnchart-datalet/columnchart-datalet.html
@@ -63,6 +63,13 @@ Example: | @@ -63,6 +63,13 @@ Example: | ||
63 | * @method transformData | 63 | * @method transformData |
64 | */ | 64 | */ |
65 | presentData: function(){ | 65 | presentData: function(){ |
66 | + var min = 0; | ||
67 | + for (var i in this.properties.series.value) { | ||
68 | + min = Math.min(Math.min.apply(Math, this.properties.series.value[i].data), min); | ||
69 | + } | ||
70 | + if(min < 0) | ||
71 | + min--; | ||
72 | + | ||
66 | options = { | 73 | options = { |
67 | chart: { | 74 | chart: { |
68 | type: 'column', | 75 | type: 'column', |
@@ -78,7 +85,7 @@ Example: | @@ -78,7 +85,7 @@ Example: | ||
78 | } | 85 | } |
79 | }, | 86 | }, |
80 | yAxis: { | 87 | yAxis: { |
81 | - min: 0, | 88 | + min: min, |
82 | title: { | 89 | title: { |
83 | text: this._component.yAxisLabel, | 90 | text: this._component.yAxisLabel, |
84 | } | 91 | } |
datalets/linechart-datalet/linechart-datalet.html
@@ -62,6 +62,13 @@ Example: | @@ -62,6 +62,13 @@ Example: | ||
62 | * @method presentData | 62 | * @method presentData |
63 | */ | 63 | */ |
64 | presentData: function(){ | 64 | presentData: function(){ |
65 | + var min = 0; | ||
66 | + for (var i in this.properties.series.value) { | ||
67 | + min = Math.min(Math.min.apply(Math, this.properties.series.value[i].data), min); | ||
68 | + } | ||
69 | + if(min < 0) | ||
70 | + min--; | ||
71 | + | ||
65 | options = { | 72 | options = { |
66 | chart: { | 73 | chart: { |
67 | zoomType: 'xy' | 74 | zoomType: 'xy' |
@@ -76,7 +83,7 @@ Example: | @@ -76,7 +83,7 @@ Example: | ||
76 | } | 83 | } |
77 | }, | 84 | }, |
78 | yAxis: { | 85 | yAxis: { |
79 | - min: 0, | 86 | + min: min, |
80 | title: { | 87 | title: { |
81 | text: this._component.yAxisLabel, | 88 | text: this._component.yAxisLabel, |
82 | } | 89 | } |
locales/controllet_ln.js
@@ -21,7 +21,7 @@ ln["selectedUrl_en"] = "Selected url"; | @@ -21,7 +21,7 @@ ln["selectedUrl_en"] = "Selected url"; | ||
21 | ln["wrongUrl_en"] = "Invalid url or data provider not supported yet."; | 21 | ln["wrongUrl_en"] = "Invalid url or data provider not supported yet."; |
22 | 22 | ||
23 | ln["providersDatasets_en"] = "PROVIDERS DATASETS"; | 23 | ln["providersDatasets_en"] = "PROVIDERS DATASETS"; |
24 | -ln["spodUsersDatasets_en"] = "SPOD USERS DATASETS"; | 24 | +ln["spodUsersDatasets_en"] = "COCREATED DATASETS"; |
25 | ln["datasets_en"] = "DATASETS LIST"; | 25 | ln["datasets_en"] = "DATASETS LIST"; |
26 | 26 | ||
27 | ln["provider_en"] = "Provider"; | 27 | ln["provider_en"] = "Provider"; |