From 76cce15d4db1dbcf94f822ce721075d5d97cc802 Mon Sep 17 00:00:00 2001 From: xPAGCOE <113696274+xPAGCOE@users.noreply.github.com> Date: Mon, 12 Feb 2024 16:19:53 +0100 Subject: [PATCH] Add files via upload --- SAC DataFrame/sacdataframe.js | 12 ++++++++++-- SAC DataFrame/sacdataframe.json | 5 +++-- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/SAC DataFrame/sacdataframe.js b/SAC DataFrame/sacdataframe.js index d5b748b..48deb70 100644 --- a/SAC DataFrame/sacdataframe.js +++ b/SAC DataFrame/sacdataframe.js @@ -68,12 +68,20 @@ var getScriptPromisify = (src) => { // Methods // DataFrame creation - newDataFrame(data, options) { + newDataFrame(data, options, is_series) { var df = null; if(this.dfd != null) { - df = new this.dfd.DataFrame(data, options); + + if(!isSeries) { + df = new this.dfd.DataFrame(data, options); + } + else { + var data_arr = new Array(); + data_arr[0] = data; + df = new this.dfd.DataFrame(data_arr, options); + } } return df; diff --git a/SAC DataFrame/sacdataframe.json b/SAC DataFrame/sacdataframe.json index aff2c8f..12ec08f 100644 --- a/SAC DataFrame/sacdataframe.json +++ b/SAC DataFrame/sacdataframe.json @@ -3,7 +3,7 @@ "vendor": "SAP", "license": "", "id": "com.sap.sample.sacdataframe", - "version": "0.9.2", + "version": "0.9.3", "name": "JavaScript DataFrame for SAC", "newInstancePrefix": "SACDataFrame", "description": "A widget that provides DataFrame-like functions", @@ -30,7 +30,8 @@ "returnType": "Selection", "description": "Create a new DataFrame with data and specified options", "parameters": [ {"name": "data", "type": "Selection[]", "description": "JSON data to set"}, - {"name": "options", "type": "Selection", "description": "JSON options to set"} ] + {"name": "options", "type": "Selection", "description": "JSON options to set"}, + {"name": "is_series", "type": "boolean", "description": "data provided as a series"} ] }, "print": { "description": "Pretty prints default (10) number of rows in a DataFrame to the console",