From a748d9bc93e53753a17026b105be34dd77071664 Mon Sep 17 00:00:00 2001 From: renato Date: Wed, 9 Mar 2016 10:50:46 +0100 Subject: [PATCH] ala NUMBER bug --- controllets/select-dataset-controllet/demo/index.html | 33 +++++++++++++++++++++++++++++++++ controllets/select-dataset-controllet/select-dataset-controllet.html | 953 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ controllets/select-visualization-controllet/demo/index.html | 33 +++++++++++++++++++++++++++++++++ controllets/select-visualization-controllet/inputs-series.html | 380 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ datalets/base-ajax-json-alasql-datalet/static/js/AjaxJsonAlasqlBehavior.js | 11 +++++++++-- 5 files changed, 1408 insertions(+), 2 deletions(-) create mode 100755 controllets/select-dataset-controllet/demo/index.html create mode 100755 controllets/select-dataset-controllet/select-dataset-controllet.html create mode 100755 controllets/select-visualization-controllet/demo/index.html create mode 100644 controllets/select-visualization-controllet/inputs-series.html diff --git a/controllets/select-dataset-controllet/demo/index.html b/controllets/select-dataset-controllet/demo/index.html new file mode 100755 index 0000000..7e36d6f --- /dev/null +++ b/controllets/select-dataset-controllet/demo/index.html @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/controllets/select-dataset-controllet/select-dataset-controllet.html b/controllets/select-dataset-controllet/select-dataset-controllet.html new file mode 100755 index 0000000..1ac3194 --- /dev/null +++ b/controllets/select-dataset-controllet/select-dataset-controllet.html @@ -0,0 +1,953 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/controllets/select-visualization-controllet/demo/index.html b/controllets/select-visualization-controllet/demo/index.html new file mode 100755 index 0000000..7e36d6f --- /dev/null +++ b/controllets/select-visualization-controllet/demo/index.html @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/controllets/select-visualization-controllet/inputs-series.html b/controllets/select-visualization-controllet/inputs-series.html new file mode 100644 index 0000000..064bd33 --- /dev/null +++ b/controllets/select-visualization-controllet/inputs-series.html @@ -0,0 +1,380 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file 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 cfd3375..6a13c00 100755 --- a/datalets/base-ajax-json-alasql-datalet/static/js/AjaxJsonAlasqlBehavior.js +++ b/datalets/base-ajax-json-alasql-datalet/static/js/AjaxJsonAlasqlBehavior.js @@ -161,9 +161,9 @@ var AjaxJsonAlasqlBehavior = { var key = Object.keys(obj[0])[i]; var v = obj[0][key]; if (!isNaN(v)) - select += fields[i] + "::NUMBER as " + this._fieldName(this._component.fields[i], "") + ", "; + select += key + "::NUMBER as " + this._fieldName(this._component.fields[i], "") + ", "; else - select += fields[i] + " as " + this._fieldName(this._component.fields[i], "") + ", "; + select += key + " as " + this._fieldName(this._component.fields[i], "") + ", "; } select = select.slice(0, -2); @@ -200,6 +200,13 @@ var AjaxJsonAlasqlBehavior = { var obj = alasql(select + " FROM ? " + groupBy + " " + orderBy + "", [obj]); } + //multiserie test + //var query = "SELECT [preteur], [annee] as [annee], SUM([capital_restant_du]) as [capital_restant_du] FROM ? GROUP BY [preteur], [annee]" + //var obj = alasql(query, [obj]); + //console.log(obj); + //this.data = obj; + + //PUSH DATA if(!obj || obj.length == 0) this.data = [] -- libgit2 0.21.4