http://git-wip-us.apache.org/repos/asf/zeppelin/blob/ed517a20/zeppelin-web/src/app/search/result-list.controller.js
----------------------------------------------------------------------
diff --git a/zeppelin-web/src/app/search/result-list.controller.js 
b/zeppelin-web/src/app/search/result-list.controller.js
index 05be721..65c10b1 100644
--- a/zeppelin-web/src/app/search/result-list.controller.js
+++ b/zeppelin-web/src/app/search/result-list.controller.js
@@ -12,107 +12,107 @@
  * limitations under the License.
  */
 
-angular.module('zeppelinWebApp').controller('SearchResultCtrl', 
SearchResultCtrl)
+angular.module('zeppelinWebApp').controller('SearchResultCtrl', 
SearchResultCtrl);
 
-function SearchResultCtrl ($scope, $routeParams, searchService) {
-  'ngInject'
+function SearchResultCtrl($scope, $routeParams, searchService) {
+  'ngInject';
 
-  $scope.isResult = true
-  $scope.searchTerm = $routeParams.searchTerm
-  let results = searchService.search({'q': $routeParams.searchTerm}).query()
+  $scope.isResult = true;
+  $scope.searchTerm = $routeParams.searchTerm;
+  let results = searchService.search({'q': $routeParams.searchTerm}).query();
 
-  results.$promise.then(function (result) {
-    $scope.notes = result.body.map(function (note) {
+  results.$promise.then(function(result) {
+    $scope.notes = result.body.map(function(note) {
       // redirect to notebook when search result is a notebook itself,
       // not a paragraph
       if (!/\/paragraph\//.test(note.id)) {
-        return note
+        return note;
       }
 
       note.id = note.id.replace('paragraph/', '?paragraph=') +
-        '&term=' + $routeParams.searchTerm
+        '&term=' + $routeParams.searchTerm;
 
-      return note
-    })
+      return note;
+    });
     if ($scope.notes.length === 0) {
-      $scope.isResult = false
+      $scope.isResult = false;
     } else {
-      $scope.isResult = true
+      $scope.isResult = true;
     }
 
-    $scope.$on('$routeChangeStart', function (event, next, current) {
+    $scope.$on('$routeChangeStart', function(event, next, current) {
       if (next.originalPath !== '/search/:searchTerm') {
-        searchService.searchTerm = ''
+        searchService.searchTerm = '';
       }
-    })
-  })
+    });
+  });
 
-  $scope.page = 0
-  $scope.allResults = false
+  $scope.page = 0;
+  $scope.allResults = false;
 
-  $scope.highlightSearchResults = function (note) {
-    return function (_editor) {
-      function getEditorMode (text) {
+  $scope.highlightSearchResults = function(note) {
+    return function(_editor) {
+      function getEditorMode(text) {
         let editorModes = {
           'ace/mode/scala': /^%(\w*\.)?spark/,
           'ace/mode/python': /^%(\w*\.)?(pyspark|python)/,
           'ace/mode/r': /^%(\w*\.)?(r|sparkr|knitr)/,
           'ace/mode/sql': /^%(\w*\.)?\wql/,
           'ace/mode/markdown': /^%md/,
-          'ace/mode/sh': /^%sh/
-        }
+          'ace/mode/sh': /^%sh/,
+        };
 
-        return Object.keys(editorModes).reduce(function (res, mode) {
-          return editorModes[mode].test(text) ? mode : res
-        }, 'ace/mode/scala')
+        return Object.keys(editorModes).reduce(function(res, mode) {
+          return editorModes[mode].test(text) ? mode : res;
+        }, 'ace/mode/scala');
       }
 
-      let Range = ace.require('ace/range').Range
+      let Range = ace.require('ace/range').Range;
 
-      _editor.setOption('highlightActiveLine', false)
-      _editor.$blockScrolling = Infinity
-      _editor.setReadOnly(true)
-      _editor.renderer.setShowGutter(false)
-      _editor.setTheme('ace/theme/chrome')
-      _editor.getSession().setMode(getEditorMode(note.text))
+      _editor.setOption('highlightActiveLine', false);
+      _editor.$blockScrolling = Infinity;
+      _editor.setReadOnly(true);
+      _editor.renderer.setShowGutter(false);
+      _editor.setTheme('ace/theme/chrome');
+      _editor.getSession().setMode(getEditorMode(note.text));
 
-      function getIndeces (term) {
-        return function (str) {
-          let indeces = []
-          let i = -1
+      function getIndeces(term) {
+        return function(str) {
+          let indeces = [];
+          let i = -1;
           while ((i = str.indexOf(term, i + 1)) >= 0) {
-            indeces.push(i)
+            indeces.push(i);
           }
-          return indeces
-        }
+          return indeces;
+        };
       }
 
-      let result = ''
+      let result = '';
       if (note.header !== '') {
-        result = note.header + '\n\n' + note.snippet
+        result = note.header + '\n\n' + note.snippet;
       } else {
-        result = note.snippet
+        result = note.snippet;
       }
 
       let lines = result
         .split('\n')
-        .map(function (line, row) {
-          let match = line.match(/<B>(.+?)<\/B>/)
+        .map(function(line, row) {
+          let match = line.match(/<B>(.+?)<\/B>/);
 
           // return early if nothing to highlight
           if (!match) {
-            return line
+            return line;
           }
 
-          let term = match[1]
+          let term = match[1];
           let __line = line
             .replace(/<B>/g, '')
-            .replace(/<\/B>/g, '')
+            .replace(/<\/B>/g, '');
 
-          let indeces = getIndeces(term)(__line)
+          let indeces = getIndeces(term)(__line);
 
-          indeces.forEach(function (start) {
-            let end = start + term.length
+          indeces.forEach(function(start) {
+            let end = start + term.length;
             if (note.header !== '' && row === 0) {
               _editor
                 .getSession()
@@ -120,14 +120,14 @@ function SearchResultCtrl ($scope, $routeParams, 
searchService) {
                   new Range(row, 0, row, line.length),
                   'search-results-highlight-header',
                   'background'
-                )
+                );
               _editor
                 .getSession()
                 .addMarker(
                   new Range(row, start, row, end),
                   'search-results-highlight',
                   'line'
-                )
+                );
             } else {
               _editor
                 .getSession()
@@ -135,20 +135,22 @@ function SearchResultCtrl ($scope, $routeParams, 
searchService) {
                   new Range(row, start, row, end),
                   'search-results-highlight',
                   'line'
-                )
+                );
             }
-          })
-          return __line
-        })
+          });
+          return __line;
+        });
 
       // resize editor based on content length
       _editor.setOption(
         'maxLines',
-        lines.reduce(function (len, line) { return len + line.length }, 0)
-      )
-
-      _editor.getSession().setValue(lines.join('\n'))
-      note.searchResult = lines
-    }
-  }
+        lines.reduce(function(len, line) {
+          return len + line.length;
+        }, 0)
+      );
+
+      _editor.getSession().setValue(lines.join('\n'));
+      note.searchResult = lines;
+    };
+  };
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/ed517a20/zeppelin-web/src/app/search/search.service.js
----------------------------------------------------------------------
diff --git a/zeppelin-web/src/app/search/search.service.js 
b/zeppelin-web/src/app/search/search.service.js
index fe4b666..248bacd 100644
--- a/zeppelin-web/src/app/search/search.service.js
+++ b/zeppelin-web/src/app/search/search.service.js
@@ -12,22 +12,22 @@
  * limitations under the License.
  */
 
-angular.module('zeppelinWebApp').service('searchService', SearchService)
+angular.module('zeppelinWebApp').service('searchService', SearchService);
 
-function SearchService ($resource, baseUrlSrv) {
-  'ngInject'
+function SearchService($resource, baseUrlSrv) {
+  'ngInject';
 
-  this.search = function (term) {
-    this.searchTerm = term.q
-    console.log('Searching for: %o', term.q)
+  this.search = function(term) {
+    this.searchTerm = term.q;
+    console.log('Searching for: %o', term.q);
     if (!term.q) { // TODO(bzz): empty string check
-      return
+      return;
     }
-    let encQuery = window.encodeURIComponent(term.q)
+    let encQuery = window.encodeURIComponent(term.q);
     return $resource(baseUrlSrv.getRestApiBase() + '/notebook/search?q=' + 
encQuery, {}, {
-      query: {method: 'GET'}
-    })
-  }
+      query: {method: 'GET'},
+    });
+  };
 
-  this.searchTerm = ''
+  this.searchTerm = '';
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/ed517a20/zeppelin-web/src/app/spell/index.js
----------------------------------------------------------------------
diff --git a/zeppelin-web/src/app/spell/index.js 
b/zeppelin-web/src/app/spell/index.js
index ac4343c..8ec4753 100644
--- a/zeppelin-web/src/app/spell/index.js
+++ b/zeppelin-web/src/app/spell/index.js
@@ -18,8 +18,8 @@
 export {
   DefaultDisplayType,
   SpellResult,
-} from './spell-result'
+} from './spell-result';
 
 export {
   SpellBase,
-} from './spell-base'
+} from './spell-base';

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/ed517a20/zeppelin-web/src/app/spell/spell-base.js
----------------------------------------------------------------------
diff --git a/zeppelin-web/src/app/spell/spell-base.js 
b/zeppelin-web/src/app/spell/spell-base.js
index 0b4216f..16e0553 100644
--- a/zeppelin-web/src/app/spell/spell-base.js
+++ b/zeppelin-web/src/app/spell/spell-base.js
@@ -19,12 +19,12 @@
 import {
   DefaultDisplayType,
   SpellResult,
-} from './spell-result'
+} from './spell-result';
 /* eslint-enable no-unused-vars */
 
 export class SpellBase {
-  constructor (magic) {
-    this.magic = magic
+  constructor(magic) {
+    this.magic = magic;
   }
 
   /**
@@ -34,8 +34,8 @@ export class SpellBase {
    * @param config {Object}
    * @return {SpellResult}
    */
-  interpret (paragraphText, config) {
-    throw new Error('SpellBase.interpret() should be overrided')
+  interpret(paragraphText, config) {
+    throw new Error('SpellBase.interpret() should be overrided');
   }
 
   /**
@@ -43,7 +43,7 @@ export class SpellBase {
    * (e.g `%flowchart`)
    * @return {string}
    */
-  getMagic () {
-    return this.magic
+  getMagic() {
+    return this.magic;
   }
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/ed517a20/zeppelin-web/src/app/spell/spell-result.js
----------------------------------------------------------------------
diff --git a/zeppelin-web/src/app/spell/spell-result.js 
b/zeppelin-web/src/app/spell/spell-result.js
index 5ba65c2..52bcdc1 100644
--- a/zeppelin-web/src/app/spell/spell-result.js
+++ b/zeppelin-web/src/app/spell/spell-result.js
@@ -21,8 +21,8 @@ export const DefaultDisplayType = {
   HTML: 'HTML',
   ANGULAR: 'ANGULAR',
   TEXT: 'TEXT',
-  NETWORK: 'NETWORK'
-}
+  NETWORK: 'NETWORK',
+};
 
 export const DefaultDisplayMagic = {
   '%element': DefaultDisplayType.ELEMENT,
@@ -31,12 +31,12 @@ export const DefaultDisplayMagic = {
   '%angular': DefaultDisplayType.ANGULAR,
   '%text': DefaultDisplayType.TEXT,
   '%network': DefaultDisplayType.NETWORK,
-}
+};
 
 export class DataWithType {
-  constructor (data, type, magic, text) {
-    this.data = data
-    this.type = type
+  constructor(data, type, magic, text) {
+    this.data = data;
+    this.type = type;
 
     /**
      * keep for `DefaultDisplayType.ELEMENT` (function data type)
@@ -46,29 +46,29 @@ export class DataWithType {
      * since they don't have context where they are created.
      */
 
-    this.magic = magic
-    this.text = text
+    this.magic = magic;
+    this.text = text;
   }
 
-  static handleDefaultMagic (m) {
+  static handleDefaultMagic(m) {
     // let's use default display type instead of magic in case of default
     // to keep consistency with backend interpreter
     if (DefaultDisplayMagic[m]) {
-      return DefaultDisplayMagic[m]
+      return DefaultDisplayMagic[m];
     } else {
-      return m
+      return m;
     }
   }
 
-  static createPropagable (dataWithType) {
+  static createPropagable(dataWithType) {
     if (!SpellResult.isFunction(dataWithType.data)) {
-      return dataWithType
+      return dataWithType;
     }
 
-    const data = dataWithType.getText()
-    const type = dataWithType.getMagic()
+    const data = dataWithType.getText();
+    const type = dataWithType.getMagic();
 
-    return new DataWithType(data, type)
+    return new DataWithType(data, type);
   }
 
   /**
@@ -77,45 +77,45 @@ export class DataWithType {
    * @param customDisplayType
    * @return {Array<DataWithType>}
    */
-  static parseStringData (data, customDisplayMagic) {
-    function availableMagic (magic) {
-      return magic && (DefaultDisplayMagic[magic] || customDisplayMagic[magic])
+  static parseStringData(data, customDisplayMagic) {
+    function availableMagic(magic) {
+      return magic && (DefaultDisplayMagic[magic] || 
customDisplayMagic[magic]);
     }
 
-    const splited = data.split('\n')
+    const splited = data.split('\n');
 
-    const gensWithTypes = []
-    let mergedGens = []
-    let previousMagic = DefaultDisplayType.TEXT
+    const gensWithTypes = [];
+    let mergedGens = [];
+    let previousMagic = DefaultDisplayType.TEXT;
 
     // create `DataWithType` whenever see available display type.
     for (let i = 0; i < splited.length; i++) {
-      const g = splited[i]
-      const magic = SpellResult.extractMagic(g)
+      const g = splited[i];
+      const magic = SpellResult.extractMagic(g);
 
       // create `DataWithType` only if see new magic
       if (availableMagic(magic) && mergedGens.length > 0) {
-        gensWithTypes.push(new DataWithType(mergedGens.join(''), 
previousMagic))
-        mergedGens = []
+        gensWithTypes.push(new DataWithType(mergedGens.join(''), 
previousMagic));
+        mergedGens = [];
       }
 
       // accumulate `data` to mergedGens
       if (availableMagic(magic)) {
-        const withoutMagic = g.split(magic)[1]
-        mergedGens.push(`${withoutMagic}\n`)
-        previousMagic = DataWithType.handleDefaultMagic(magic)
+        const withoutMagic = g.split(magic)[1];
+        mergedGens.push(`${withoutMagic}\n`);
+        previousMagic = DataWithType.handleDefaultMagic(magic);
       } else {
-        mergedGens.push(`${g}\n`)
+        mergedGens.push(`${g}\n`);
       }
     }
 
     // cleanup the last `DataWithType`
     if (mergedGens.length > 0) {
-      previousMagic = DataWithType.handleDefaultMagic(previousMagic)
-      gensWithTypes.push(new DataWithType(mergedGens.join(''), previousMagic))
+      previousMagic = DataWithType.handleDefaultMagic(previousMagic);
+      gensWithTypes.push(new DataWithType(mergedGens.join(''), previousMagic));
     }
 
-    return gensWithTypes
+    return gensWithTypes;
   }
 
   /**
@@ -128,44 +128,46 @@ export class DataWithType {
    * @param textWithoutMagic
    * @return {Promise<Array<DataWithType>>}
    */
-  static produceMultipleData (dataWithType, customDisplayType,
+  static produceMultipleData(dataWithType, customDisplayType,
                              magic, textWithoutMagic) {
-    const data = dataWithType.getData()
-    const type = dataWithType.getType()
+    const data = dataWithType.getData();
+    const type = dataWithType.getType();
 
     // if the type is specified, just return it
     // handle non-specified dataWithTypes only
     if (type) {
-      return new Promise((resolve) => { resolve([dataWithType]) })
+      return new Promise((resolve) => {
+        resolve([dataWithType]);
+      });
     }
 
-    let wrapped
+    let wrapped;
 
     if (SpellResult.isFunction(data)) {
       // if data is a function, we consider it as ELEMENT type.
       wrapped = new Promise((resolve) => {
         const dt = new DataWithType(
-          data, DefaultDisplayType.ELEMENT, magic, textWithoutMagic)
-        const result = [dt]
-        return resolve(result)
-      })
+          data, DefaultDisplayType.ELEMENT, magic, textWithoutMagic);
+        const result = [dt];
+        return resolve(result);
+      });
     } else if (SpellResult.isPromise(data)) {
       // if data is a promise,
-      wrapped = data.then(generated => {
+      wrapped = data.then((generated) => {
         const result =
-          DataWithType.parseStringData(generated, customDisplayType)
-        return result
-      })
+          DataWithType.parseStringData(generated, customDisplayType);
+        return result;
+      });
     } else {
       // if data is a object, parse it to multiples
       wrapped = new Promise((resolve) => {
         const result =
-          DataWithType.parseStringData(data, customDisplayType)
-        return resolve(result)
-      })
+          DataWithType.parseStringData(data, customDisplayType);
+        return resolve(result);
+      });
     }
 
-    return wrapped
+    return wrapped;
   }
 
   /**
@@ -177,8 +179,8 @@ export class DataWithType {
    *   will be called in `then()` of this promise.
    * @returns {*} `data` which can be object, function or promise.
    */
-  getData () {
-    return this.data
+  getData() {
+    return this.data;
   }
 
   /**
@@ -187,66 +189,66 @@ export class DataWithType {
    * by `SpellResult.parseStringData()`
    * @returns {string}
    */
-  getType () {
-    return this.type
+  getType() {
+    return this.type;
   }
 
-  getMagic () {
-    return this.magic
+  getMagic() {
+    return this.magic;
   }
 
-  getText () {
-    return this.text
+  getText() {
+    return this.text;
   }
 }
 
 export class SpellResult {
-  constructor (resultData, resultType) {
-    this.dataWithTypes = []
-    this.add(resultData, resultType)
+  constructor(resultData, resultType) {
+    this.dataWithTypes = [];
+    this.add(resultData, resultType);
   }
 
-  static isFunction (data) {
-    return (data && typeof data === 'function')
+  static isFunction(data) {
+    return (data && typeof data === 'function');
   }
 
-  static isPromise (data) {
-    return (data && typeof data.then === 'function')
+  static isPromise(data) {
+    return (data && typeof data.then === 'function');
   }
 
-  static isObject (data) {
+  static isObject(data) {
     return (data &&
       !SpellResult.isFunction(data) &&
-      !SpellResult.isPromise(data))
+      !SpellResult.isPromise(data));
   }
 
-  static extractMagic (allParagraphText) {
-    const pattern = /^\s*%(\S+)\s*/g
+  static extractMagic(allParagraphText) {
+    const pattern = /^\s*%(\S+)\s*/g;
     try {
-      let match = pattern.exec(allParagraphText)
+      let match = pattern.exec(allParagraphText);
       if (match) {
-        return `%${match[1].trim()}`
+        return `%${match[1].trim()}`;
       }
     } catch (error) {
       // failed to parse, ignore
     }
 
-    return undefined
+    return undefined;
   }
 
-  static createPropagable (resultMsg) {
-    return resultMsg.map(dt => {
-      return DataWithType.createPropagable(dt)
-    })
+  static createPropagable(resultMsg) {
+    return resultMsg.map((dt) => {
+      return DataWithType.createPropagable(dt);
+    });
   }
 
-  add (resultData, resultType) {
+  add(resultData, resultType) {
     if (resultData) {
       this.dataWithTypes.push(
-        new DataWithType(resultData, resultType))
+        new DataWithType(resultData, resultType));
     }
 
-    return this
+    return this;
   }
 
   /**
@@ -254,23 +256,23 @@ export class SpellResult {
    * @param textWithoutMagic
    * @return {Promise<Array<DataWithType>>}
    */
-  getAllParsedDataWithTypes (customDisplayType, magic, textWithoutMagic) {
-    const promises = this.dataWithTypes.map(dt => {
+  getAllParsedDataWithTypes(customDisplayType, magic, textWithoutMagic) {
+    const promises = this.dataWithTypes.map((dt) => {
       return DataWithType.produceMultipleData(
-        dt, customDisplayType, magic, textWithoutMagic)
-    })
+        dt, customDisplayType, magic, textWithoutMagic);
+    });
 
     // some promises can include an array so we need to flatten them
-    const flatten = Promise.all(promises).then(values => {
+    const flatten = Promise.all(promises).then((values) => {
       return values.reduce((acc, cur) => {
         if (Array.isArray(cur)) {
-          return acc.concat(cur)
+          return acc.concat(cur);
         } else {
-          return acc.concat([cur])
+          return acc.concat([cur]);
         }
-      })
-    })
+      });
+    });
 
-    return flatten
+    return flatten;
   }
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/ed517a20/zeppelin-web/src/app/tabledata/advanced-transformation-util.js
----------------------------------------------------------------------
diff --git a/zeppelin-web/src/app/tabledata/advanced-transformation-util.js 
b/zeppelin-web/src/app/tabledata/advanced-transformation-util.js
index 0d1c2f6..97c1b2c 100644
--- a/zeppelin-web/src/app/tabledata/advanced-transformation-util.js
+++ b/zeppelin-web/src/app/tabledata/advanced-transformation-util.js
@@ -13,40 +13,40 @@
  */
 
 export function getCurrentChart(config) {
-  return config.chart.current
+  return config.chart.current;
 }
 
 export function getCurrentChartTransform(config) {
-  return config.spec.charts[getCurrentChart(config)].transform
+  return config.spec.charts[getCurrentChart(config)].transform;
 }
 
 export function getCurrentChartAxis(config) {
-  return config.axis[getCurrentChart(config)]
+  return config.axis[getCurrentChart(config)];
 }
 
 export function getCurrentChartParam(config) {
-  return config.parameter[getCurrentChart(config)]
+  return config.parameter[getCurrentChart(config)];
 }
 
 export function getCurrentChartAxisSpecs(config) {
-  return config.axisSpecs[getCurrentChart(config)]
+  return config.axisSpecs[getCurrentChart(config)];
 }
 
 export function getCurrentChartParamSpecs(config) {
-  return config.paramSpecs[getCurrentChart(config)]
+  return config.paramSpecs[getCurrentChart(config)];
 }
 
 export function useSharedAxis(config, chart) {
-  return config.spec.charts[chart].sharedAxis
+  return config.spec.charts[chart].sharedAxis;
 }
 
 export function serializeSharedAxes(config) {
-  const availableCharts = getAvailableChartNames(config.spec.charts)
+  const availableCharts = getAvailableChartNames(config.spec.charts);
   for (let i = 0; i < availableCharts.length; i++) {
-    const chartName = availableCharts[i]
+    const chartName = availableCharts[i];
     if (useSharedAxis(config, chartName)) {
       /** use reference :) in case of sharedAxis */
-      config.axis[chartName] = config.sharedAxis
+      config.axis[chartName] = config.sharedAxis;
     }
   }
 }
@@ -56,22 +56,22 @@ export const Widget = {
   OPTION: 'option',
   CHECKBOX: 'checkbox',
   TEXTAREA: 'textarea',
-}
+};
 
 export function isInputWidget(paramSpec) {
-  return (paramSpec && !paramSpec.widget) || (paramSpec && paramSpec.widget 
=== Widget.INPUT)
+  return (paramSpec && !paramSpec.widget) || (paramSpec && paramSpec.widget 
=== Widget.INPUT);
 }
 
 export function isOptionWidget(paramSpec) {
-  return paramSpec && paramSpec.widget === Widget.OPTION
+  return paramSpec && paramSpec.widget === Widget.OPTION;
 }
 
 export function isCheckboxWidget(paramSpec) {
-  return paramSpec && paramSpec.widget === Widget.CHECKBOX
+  return paramSpec && paramSpec.widget === Widget.CHECKBOX;
 }
 
 export function isTextareaWidget(paramSpec) {
-  return paramSpec && paramSpec.widget === Widget.TEXTAREA
+  return paramSpec && paramSpec.widget === Widget.TEXTAREA;
 }
 
 export const ParameterValueType = {
@@ -80,59 +80,71 @@ export const ParameterValueType = {
   BOOLEAN: 'boolean',
   STRING: 'string',
   JSON: 'JSON',
-}
+};
 
 export function parseParameter(paramSpecs, param) {
   /** copy original params */
-  const parsed = JSON.parse(JSON.stringify(param))
+  const parsed = JSON.parse(JSON.stringify(param));
 
   for (let i = 0; i < paramSpecs.length; i++) {
-    const paramSpec = paramSpecs[i]
-    const name = paramSpec.name
+    const paramSpec = paramSpecs[i];
+    const name = paramSpec.name;
 
     if (paramSpec.valueType === ParameterValueType.INT &&
       typeof parsed[name] !== 'number') {
-      try { parsed[name] = parseInt(parsed[name]) } catch (error) { 
parsed[name] = paramSpec.defaultValue }
+      try {
+        parsed[name] = parseInt(parsed[name]);
+      } catch (error) {
+        parsed[name] = paramSpec.defaultValue;
+      }
     } else if (paramSpec.valueType === ParameterValueType.FLOAT &&
       typeof parsed[name] !== 'number') {
-      try { parsed[name] = parseFloat(parsed[name]) } catch (error) { 
parsed[name] = paramSpec.defaultValue }
+      try {
+        parsed[name] = parseFloat(parsed[name]);
+      } catch (error) {
+        parsed[name] = paramSpec.defaultValue;
+      }
     } else if (paramSpec.valueType === ParameterValueType.BOOLEAN) {
       if (parsed[name] === 'false') {
-        parsed[name] = false
+        parsed[name] = false;
       } else if (parsed[name] === 'true') {
-        parsed[name] = true
+        parsed[name] = true;
       } else if (typeof parsed[name] !== 'boolean') {
-        parsed[name] = paramSpec.defaultValue
+        parsed[name] = paramSpec.defaultValue;
       }
     } else if (paramSpec.valueType === ParameterValueType.JSON) {
       if (parsed[name] !== null && typeof parsed[name] !== 'object') {
-        try { parsed[name] = JSON.parse(parsed[name]) } catch (error) { 
parsed[name] = paramSpec.defaultValue }
+        try {
+          parsed[name] = JSON.parse(parsed[name]);
+        } catch (error) {
+          parsed[name] = paramSpec.defaultValue;
+        }
       } else if (parsed[name] === null) {
-        parsed[name] = paramSpec.defaultValue
+        parsed[name] = paramSpec.defaultValue;
       }
     }
   }
 
-  return parsed
+  return parsed;
 }
 
 export const AxisType = {
   AGGREGATOR: 'aggregator',
   KEY: 'key',
   GROUP: 'group',
-}
+};
 
 export function isAggregatorAxis(axisSpec) {
-  return axisSpec && axisSpec.axisType === AxisType.AGGREGATOR
+  return axisSpec && axisSpec.axisType === AxisType.AGGREGATOR;
 }
 export function isGroupAxis(axisSpec) {
-  return axisSpec && axisSpec.axisType === AxisType.GROUP
+  return axisSpec && axisSpec.axisType === AxisType.GROUP;
 }
 export function isKeyAxis(axisSpec) {
-  return axisSpec && axisSpec.axisType === AxisType.KEY
+  return axisSpec && axisSpec.axisType === AxisType.KEY;
 }
 export function isSingleDimensionAxis(axisSpec) {
-  return axisSpec && axisSpec.dimension === 'single'
+  return axisSpec && axisSpec.dimension === 'single';
 }
 
 /**
@@ -142,92 +154,112 @@ export function isSingleDimensionAxis(axisSpec) {
  * add the `name` field while converting to array to easily manipulate
  */
 export function getSpecs(specObject) {
-  const specs = []
+  const specs = [];
   for (let name in specObject) {
-    const singleSpec = specObject[name]
-    if (!singleSpec) { continue }
-    singleSpec.name = name
-    specs.push(singleSpec)
+    if (specObject.hasOwnProperty(name)) {
+      const singleSpec = specObject[name];
+      if (!singleSpec) {
+        continue;
+      }
+      singleSpec.name = name;
+      specs.push(singleSpec);
+    }
   }
 
-  return specs
+  return specs;
 }
 
 export function getAvailableChartNames(charts) {
-  const available = []
+  const available = [];
   for (let name in charts) {
-    available.push(name)
+    if (charts.hasOwnProperty(name)) {
+      available.push(name);
+    }
   }
 
-  return available
+  return available;
 }
 
 export function applyMaxAxisCount(config, axisSpec) {
   if (isSingleDimensionAxis(axisSpec) || typeof axisSpec.maxAxisCount === 
'undefined') {
-    return
+    return;
   }
 
-  const columns = getCurrentChartAxis(config)[axisSpec.name]
-  if (columns.length <= axisSpec.maxAxisCount) { return }
+  const columns = getCurrentChartAxis(config)[axisSpec.name];
+  if (columns.length <= axisSpec.maxAxisCount) {
+    return;
+  }
 
-  const sliced = columns.slice(1)
-  getCurrentChartAxis(config)[axisSpec.name] = sliced
+  const sliced = columns.slice(1);
+  getCurrentChartAxis(config)[axisSpec.name] = sliced;
 }
 
 export function removeDuplicatedColumnsInMultiDimensionAxis(config, axisSpec) {
-  if (isSingleDimensionAxis(axisSpec)) { return config }
+  if (isSingleDimensionAxis(axisSpec)) {
+    return config;
+  }
 
-  const columns = getCurrentChartAxis(config)[axisSpec.name]
+  const columns = getCurrentChartAxis(config)[axisSpec.name];
   const uniqObject = columns.reduce((acc, col) => {
-    if (!acc[`${col.name}(${col.aggr})`]) { acc[`${col.name}(${col.aggr})`] = 
col }
-    return acc
-  }, {})
+    if (!acc[`${col.name}(${col.aggr})`]) {
+      acc[`${col.name}(${col.aggr})`] = col;
+    }
+    return acc;
+  }, {});
 
-  const filtered = []
+  const filtered = [];
   for (let name in uniqObject) {
-    const col = uniqObject[name]
-    filtered.push(col)
+    if (uniqObject.hasOwnProperty(name)) {
+      const col = uniqObject[name];
+      filtered.push(col);
+    }
   }
 
-  getCurrentChartAxis(config)[axisSpec.name] = filtered
-  return config
+  getCurrentChartAxis(config)[axisSpec.name] = filtered;
+  return config;
 }
 
 export function clearAxisConfig(config) {
-  delete config.axis /** Object: persisted axis for each chart */
-  delete config.sharedAxis
+  delete config.axis; /** Object: persisted axis for each chart */
+  delete config.sharedAxis;
 }
 
 export function initAxisConfig(config) {
-  if (!config.axis) { config.axis = {} }
-  if (!config.sharedAxis) { config.sharedAxis = {} }
+  if (!config.axis) {
+    config.axis = {};
+  }
+  if (!config.sharedAxis) {
+    config.sharedAxis = {};
+  }
 
-  const spec = config.spec
-  const availableCharts = getAvailableChartNames(spec.charts)
+  const spec = config.spec;
+  const availableCharts = getAvailableChartNames(spec.charts);
 
-  if (!config.axisSpecs) { config.axisSpecs = {} }
+  if (!config.axisSpecs) {
+    config.axisSpecs = {};
+  }
   for (let i = 0; i < availableCharts.length; i++) {
-    const chartName = availableCharts[i]
+    const chartName = availableCharts[i];
 
     if (!config.axis[chartName]) {
-      config.axis[chartName] = {}
+      config.axis[chartName] = {};
     }
-    const axisSpecs = getSpecs(spec.charts[chartName].axis)
+    const axisSpecs = getSpecs(spec.charts[chartName].axis);
     if (!config.axisSpecs[chartName]) {
-      config.axisSpecs[chartName] = axisSpecs
+      config.axisSpecs[chartName] = axisSpecs;
     }
 
     /** initialize multi-dimension axes */
     for (let i = 0; i < axisSpecs.length; i++) {
-      const axisSpec = axisSpecs[i]
+      const axisSpec = axisSpecs[i];
       if (isSingleDimensionAxis(axisSpec)) {
-        continue
+        continue;
       }
 
       /** intentionally nested if-stmt is used because order of conditions 
matter here */
       if (!useSharedAxis(config, chartName)) {
         if (!Array.isArray(config.axis[chartName][axisSpec.name])) {
-          config.axis[chartName][axisSpec.name] = []
+          config.axis[chartName][axisSpec.name] = [];
         }
       } else if (useSharedAxis(config, chartName)) {
         /**
@@ -235,180 +267,200 @@ export function initAxisConfig(config) {
          * all charts using shared axis have the same axis specs
          */
         if (!Array.isArray(config.sharedAxis[axisSpec.name])) {
-          config.sharedAxis[axisSpec.name] = []
+          config.sharedAxis[axisSpec.name] = [];
         }
       }
     }
   }
 
   /** this function should be called after initializing */
-  serializeSharedAxes(config)
+  serializeSharedAxes(config);
 }
 
 export function resetAxisConfig(config) {
-  clearAxisConfig(config)
-  initAxisConfig(config)
+  clearAxisConfig(config);
+  initAxisConfig(config);
 }
 
 export function clearParameterConfig(config) {
-  delete config.parameter  /** Object: persisted parameter for each chart */
+  delete config.parameter;  /** Object: persisted parameter for each chart */
 }
 
 export function initParameterConfig(config) {
-  if (!config.parameter) { config.parameter = {} }
+  if (!config.parameter) {
+    config.parameter = {};
+  }
 
-  const spec = config.spec
-  const availableCharts = getAvailableChartNames(spec.charts)
+  const spec = config.spec;
+  const availableCharts = getAvailableChartNames(spec.charts);
 
-  if (!config.paramSpecs) { config.paramSpecs = {} }
+  if (!config.paramSpecs) {
+    config.paramSpecs = {};
+  }
   for (let i = 0; i < availableCharts.length; i++) {
-    const chartName = availableCharts[i]
+    const chartName = availableCharts[i];
 
-    if (!config.parameter[chartName]) { config.parameter[chartName] = {} }
-    const paramSpecs = getSpecs(spec.charts[chartName].parameter)
-    if (!config.paramSpecs[chartName]) { config.paramSpecs[chartName] = 
paramSpecs }
+    if (!config.parameter[chartName]) {
+      config.parameter[chartName] = {};
+    }
+    const paramSpecs = getSpecs(spec.charts[chartName].parameter);
+    if (!config.paramSpecs[chartName]) {
+      config.paramSpecs[chartName] = paramSpecs;
+    }
 
     for (let i = 0; i < paramSpecs.length; i++) {
-      const paramSpec = paramSpecs[i]
+      const paramSpec = paramSpecs[i];
       if (!config.parameter[chartName][paramSpec.name]) {
-        config.parameter[chartName][paramSpec.name] = paramSpec.defaultValue
+        config.parameter[chartName][paramSpec.name] = paramSpec.defaultValue;
       }
     }
   }
 }
 
 export function resetParameterConfig(config) {
-  clearParameterConfig(config)
-  initParameterConfig(config)
+  clearParameterConfig(config);
+  initParameterConfig(config);
 }
 
 export function getSpecVersion(availableCharts, spec) {
-  const axisHash = {}
-  const paramHash = {}
+  const axisHash = {};
+  const paramHash = {};
 
   for (let i = 0; i < availableCharts.length; i++) {
-    const chartName = availableCharts[i]
-    const axisSpecs = getSpecs(spec.charts[chartName].axis)
-    axisHash[chartName] = axisSpecs
+    const chartName = availableCharts[i];
+    const axisSpecs = getSpecs(spec.charts[chartName].axis);
+    axisHash[chartName] = axisSpecs;
 
-    const paramSpecs = getSpecs(spec.charts[chartName].parameter)
-    paramHash[chartName] = paramSpecs
+    const paramSpecs = getSpecs(spec.charts[chartName].parameter);
+    paramHash[chartName] = paramSpecs;
   }
 
-  return { axisVersion: JSON.stringify(axisHash), paramVersion: 
JSON.stringify(paramHash), }
+  return {axisVersion: JSON.stringify(axisHash), paramVersion: 
JSON.stringify(paramHash)};
 }
 
 export function initializeConfig(config, spec) {
-  config.chartChanged = true
-  config.parameterChanged = false
+  config.chartChanged = true;
+  config.parameterChanged = false;
 
-  let updated = false
+  let updated = false;
 
-  const availableCharts = getAvailableChartNames(spec.charts)
-  const { axisVersion, paramVersion, } = getSpecVersion(availableCharts, spec)
+  const availableCharts = getAvailableChartNames(spec.charts);
+  const {axisVersion, paramVersion} = getSpecVersion(availableCharts, spec);
 
   if (!config.spec || !config.spec.version ||
     !config.spec.version.axis ||
     config.spec.version.axis !== axisVersion) {
-    spec.initialized = true
-    updated = true
+    spec.initialized = true;
+    updated = true;
 
-    delete config.chart      /** Object: contains current, available chart */
-    config.panel = { columnPanelOpened: true, parameterPanelOpened: false, }
+    delete config.chart;      /** Object: contains current, available chart */
+    config.panel = {columnPanelOpened: true, parameterPanelOpened: false};
 
-    clearAxisConfig(config)
-    delete config.axisSpecs  /** Object: persisted axisSpecs for each chart */
+    clearAxisConfig(config);
+    delete config.axisSpecs;  /** Object: persisted axisSpecs for each chart */
   }
 
   if (!config.spec || !config.spec.version ||
     !config.spec.version.parameter ||
     config.spec.version.parameter !== paramVersion) {
-    updated = true
+    updated = true;
 
-    clearParameterConfig(config)
-    delete config.paramSpecs /** Object: persisted paramSpecs for each chart */
+    clearParameterConfig(config);
+    delete config.paramSpecs; /** Object: persisted paramSpecs for each chart 
*/
   }
 
-  if (!spec.version) { spec.version = {} }
-  spec.version.axis = axisVersion
-  spec.version.parameter = paramVersion
+  if (!spec.version) {
+    spec.version = {};
+  }
+  spec.version.axis = axisVersion;
+  spec.version.parameter = paramVersion;
 
-  if (!config.spec || updated) { config.spec = spec }
+  if (!config.spec || updated) {
+    config.spec = spec;
+  }
 
   if (!config.chart) {
-    config.chart = {}
-    config.chart.current = availableCharts[0]
-    config.chart.available = availableCharts
+    config.chart = {};
+    config.chart.current = availableCharts[0];
+    config.chart.available = availableCharts;
   }
 
   /** initialize config.axis, config.axisSpecs for each chart */
-  initAxisConfig(config)
+  initAxisConfig(config);
 
   /** initialize config.parameter for each chart */
-  initParameterConfig(config)
-  return config
+  initParameterConfig(config);
+  return config;
 }
 
 export function getColumnsForMultipleAxes(axisType, axisSpecs, axis) {
-  const axisNames = []
-  let column = {}
+  const axisNames = [];
+  let column = {};
 
   for (let i = 0; i < axisSpecs.length; i++) {
-    const axisSpec = axisSpecs[i]
+    const axisSpec = axisSpecs[i];
 
     if (axisType === AxisType.KEY && isKeyAxis(axisSpec)) {
-      axisNames.push(axisSpec.name)
+      axisNames.push(axisSpec.name);
     } else if (axisType === AxisType.GROUP && isGroupAxis(axisSpec)) {
-      axisNames.push(axisSpec.name)
+      axisNames.push(axisSpec.name);
     } else if (axisType.AGGREGATOR && isAggregatorAxis(axisSpec)) {
-      axisNames.push(axisSpec.name)
+      axisNames.push(axisSpec.name);
     }
   }
 
   for (let axisName of axisNames) {
-    const columns = axis[axisName]
-    if (typeof axis[axisName] === 'undefined') { continue }
-    if (!column[axisName]) { column[axisName] = [] }
-    column[axisName] = column[axisName].concat(columns)
+    const columns = axis[axisName];
+    if (typeof axis[axisName] === 'undefined') {
+      continue;
+    }
+    if (!column[axisName]) {
+      column[axisName] = [];
+    }
+    column[axisName] = column[axisName].concat(columns);
   }
 
-  return column
+  return column;
 }
 
 export function getColumnsFromAxis(axisSpecs, axis) {
-  const keyAxisNames = []
-  const groupAxisNames = []
-  const aggrAxisNames = []
+  const keyAxisNames = [];
+  const groupAxisNames = [];
+  const aggrAxisNames = [];
 
   for (let i = 0; i < axisSpecs.length; i++) {
-    const axisSpec = axisSpecs[i]
+    const axisSpec = axisSpecs[i];
 
     if (isKeyAxis(axisSpec)) {
-      keyAxisNames.push(axisSpec.name)
+      keyAxisNames.push(axisSpec.name);
     } else if (isGroupAxis(axisSpec)) {
-      groupAxisNames.push(axisSpec.name)
+      groupAxisNames.push(axisSpec.name);
     } else if (isAggregatorAxis(axisSpec)) {
-      aggrAxisNames.push(axisSpec.name)
+      aggrAxisNames.push(axisSpec.name);
     }
   }
 
-  let keyColumns = []
-  let groupColumns = []
-  let aggregatorColumns = []
-  let customColumn = {}
+  let keyColumns = [];
+  let groupColumns = [];
+  let aggregatorColumns = [];
+  let customColumn = {};
 
   for (let axisName in axis) {
-    const columns = axis[axisName]
-    if (keyAxisNames.includes(axisName)) {
-      keyColumns = keyColumns.concat(columns)
-    } else if (groupAxisNames.includes(axisName)) {
-      groupColumns = groupColumns.concat(columns)
-    } else if (aggrAxisNames.includes(axisName)) {
-      aggregatorColumns = aggregatorColumns.concat(columns)
-    } else {
-      const axisType = axisSpecs.filter(s => s.name === axisName)[0].axisType
-      if (!customColumn[axisType]) { customColumn[axisType] = [] }
-      customColumn[axisType] = customColumn[axisType].concat(columns)
+    if (axis.hasOwnProperty(axisName)) {
+      const columns = axis[axisName];
+      if (keyAxisNames.includes(axisName)) {
+        keyColumns = keyColumns.concat(columns);
+      } else if (groupAxisNames.includes(axisName)) {
+        groupColumns = groupColumns.concat(columns);
+      } else if (aggrAxisNames.includes(axisName)) {
+        aggregatorColumns = aggregatorColumns.concat(columns);
+      } else {
+        const axisType = axisSpecs.filter((s) => s.name === 
axisName)[0].axisType;
+        if (!customColumn[axisType]) {
+          customColumn[axisType] = [];
+        }
+        customColumn[axisType] = customColumn[axisType].concat(columns);
+      }
     }
   }
 
@@ -417,7 +469,7 @@ export function getColumnsFromAxis(axisSpecs, axis) {
     group: groupColumns,
     aggregator: aggregatorColumns,
     custom: customColumn,
-  }
+  };
 }
 
 export const Aggregator = {
@@ -426,7 +478,7 @@ export const Aggregator = {
   AVG: 'avg',
   MIN: 'min',
   MAX: 'max',
-}
+};
 
 const TransformMethod = {
   /**
@@ -449,38 +501,42 @@ const TransformMethod = {
   ARRAY: 'array',
   ARRAY_2_KEY: 'array:2-key',
   DRILL_DOWN: 'drill-down',
-}
+};
 
 /** return function for lazy computation */
 export function getTransformer(conf, rows, axisSpecs, axis) {
-  let transformer = () => {}
+  let transformer = () => {};
 
-  const transformSpec = getCurrentChartTransform(conf)
-  if (!transformSpec) { return transformer }
+  const transformSpec = getCurrentChartTransform(conf);
+  if (!transformSpec) {
+    return transformer;
+  }
 
-  const method = transformSpec.method
+  const method = transformSpec.method;
 
-  const columns = getColumnsFromAxis(axisSpecs, axis)
-  const keyColumns = columns.key
-  const groupColumns = columns.group
-  const aggregatorColumns = columns.aggregator
-  const customColumns = columns.custom
+  const columns = getColumnsFromAxis(axisSpecs, axis);
+  const keyColumns = columns.key;
+  const groupColumns = columns.group;
+  const aggregatorColumns = columns.aggregator;
+  const customColumns = columns.custom;
 
   let column = {
     key: keyColumns, group: groupColumns, aggregator: aggregatorColumns, 
custom: customColumns,
-  }
+  };
 
   if (method === TransformMethod.RAW) {
-    transformer = () => { return rows }
+    transformer = () => {
+      return rows;
+    };
   } else if (method === TransformMethod.OBJECT) {
     transformer = () => {
-      const { cube, schema, keyColumnName, keyNames, groupNameSet, 
selectorNameWithIndex, } =
-        getKGACube(rows, keyColumns, groupColumns, aggregatorColumns)
+      const {cube, schema, keyColumnName, keyNames, groupNameSet, 
selectorNameWithIndex} =
+        getKGACube(rows, keyColumns, groupColumns, aggregatorColumns);
 
       const {
-        transformed, groupNames, sortedSelectors
+        transformed, groupNames, sortedSelectors,
       } = getObjectRowsFromKGACube(cube, schema, aggregatorColumns,
-        keyColumnName, keyNames, groupNameSet, selectorNameWithIndex)
+        keyColumnName, keyNames, groupNameSet, selectorNameWithIndex);
 
       return {
         rows: transformed,
@@ -488,17 +544,17 @@ export function getTransformer(conf, rows, axisSpecs, 
axis) {
         keyNames,
         groupNames: groupNames,
         selectors: sortedSelectors,
-      }
-    }
+      };
+    };
   } else if (method === TransformMethod.ARRAY) {
     transformer = () => {
-      const { cube, schema, keyColumnName, keyNames, groupNameSet, 
selectorNameWithIndex, } =
-        getKGACube(rows, keyColumns, groupColumns, aggregatorColumns)
+      const {cube, schema, keyColumnName, keyNames, groupNameSet, 
selectorNameWithIndex} =
+        getKGACube(rows, keyColumns, groupColumns, aggregatorColumns);
 
       const {
         transformed, groupNames, sortedSelectors,
       } = getArrayRowsFromKGACube(cube, schema, aggregatorColumns,
-        keyColumnName, keyNames, groupNameSet, selectorNameWithIndex)
+        keyColumnName, keyNames, groupNameSet, selectorNameWithIndex);
 
       return {
         rows: transformed,
@@ -506,34 +562,40 @@ export function getTransformer(conf, rows, axisSpecs, 
axis) {
         keyNames,
         groupNames: groupNames,
         selectors: sortedSelectors,
-      }
-    }
+      };
+    };
   } else if (method === TransformMethod.ARRAY_2_KEY) {
-    const keyAxisColumn = getColumnsForMultipleAxes(AxisType.KEY, axisSpecs, 
axis)
-    column.key = keyAxisColumn
+    const keyAxisColumn = getColumnsForMultipleAxes(AxisType.KEY, axisSpecs, 
axis);
+    column.key = keyAxisColumn;
 
-    let key1Columns = []
-    let key2Columns = []
+    let key1Columns = [];
+    let key2Columns = [];
 
     // since ARRAY_2_KEY :)
-    let i = 0
+    let i = 0;
     for (let axisName in keyAxisColumn) {
-      if (i === 2) { break }
+      if (i === 2) {
+        break;
+      }
 
-      if (i === 0) { key1Columns = keyAxisColumn[axisName] } else if (i === 1) 
{ key2Columns = keyAxisColumn[axisName] }
-      i++
+      if (i === 0) {
+        key1Columns = keyAxisColumn[axisName];
+      } else if (i === 1) {
+        key2Columns = keyAxisColumn[axisName];
+      }
+      i++;
     }
 
-    const { cube, schema,
+    const {cube, schema,
       key1ColumnName, key1Names, key2ColumnName, key2Names,
       groupNameSet, selectorNameWithIndex,
-    } = getKKGACube(rows, key1Columns, key2Columns, groupColumns, 
aggregatorColumns)
+    } = getKKGACube(rows, key1Columns, key2Columns, groupColumns, 
aggregatorColumns);
 
     const {
       transformed, groupNames, sortedSelectors,
       key1NameWithIndex, key2NameWithIndex,
     } = getArrayRowsFromKKGACube(cube, schema, aggregatorColumns,
-      key1Names, key2Names, groupNameSet, selectorNameWithIndex)
+      key1Names, key2Names, groupNameSet, selectorNameWithIndex);
 
     transformer = () => {
       return {
@@ -546,17 +608,17 @@ export function getTransformer(conf, rows, axisSpecs, 
axis) {
         key2NameWithIndex: key2NameWithIndex,
         groupNames: groupNames,
         selectors: sortedSelectors,
-      }
-    }
+      };
+    };
   } else if (method === TransformMethod.DRILL_DOWN) {
     transformer = () => {
-      const { cube, schema, keyColumnName, keyNames, groupNameSet, 
selectorNameWithIndex, } =
-        getKAGCube(rows, keyColumns, groupColumns, aggregatorColumns)
+      const {cube, schema, keyColumnName, keyNames, groupNameSet, 
selectorNameWithIndex} =
+        getKAGCube(rows, keyColumns, groupColumns, aggregatorColumns);
 
       const {
         transformed, groupNames, sortedSelectors,
       } = getDrilldownRowsFromKAGCube(cube, schema, aggregatorColumns,
-        keyColumnName, keyNames, groupNameSet, selectorNameWithIndex)
+        keyColumnName, keyNames, groupNameSet, selectorNameWithIndex);
 
       return {
         rows: transformed,
@@ -564,48 +626,48 @@ export function getTransformer(conf, rows, axisSpecs, 
axis) {
         keyNames,
         groupNames: groupNames,
         selectors: sortedSelectors,
-      }
-    }
+      };
+    };
   }
 
-  return { transformer: transformer, column: column, }
+  return {transformer: transformer, column: column};
 }
 
 const AggregatorFunctions = {
   sum: function(a, b) {
-    const varA = (a !== undefined) ? (isNaN(a) ? 1 : parseFloat(a)) : 0
-    const varB = (b !== undefined) ? (isNaN(b) ? 1 : parseFloat(b)) : 0
-    return varA + varB
+    const varA = (a !== undefined) ? (isNaN(a) ? 1 : parseFloat(a)) : 0;
+    const varB = (b !== undefined) ? (isNaN(b) ? 1 : parseFloat(b)) : 0;
+    return varA + varB;
   },
   count: function(a, b) {
-    const varA = (a !== undefined) ? parseInt(a) : 0
-    const varB = (b !== undefined) ? 1 : 0
-    return varA + varB
+    const varA = (a !== undefined) ? parseInt(a) : 0;
+    const varB = (b !== undefined) ? 1 : 0;
+    return varA + varB;
   },
   min: function(a, b) {
-    const varA = (a !== undefined) ? (isNaN(a) ? 1 : parseFloat(a)) : 0
-    const varB = (b !== undefined) ? (isNaN(b) ? 1 : parseFloat(b)) : 0
-    return Math.min(varA, varB)
+    const varA = (a !== undefined) ? (isNaN(a) ? 1 : parseFloat(a)) : 0;
+    const varB = (b !== undefined) ? (isNaN(b) ? 1 : parseFloat(b)) : 0;
+    return Math.min(varA, varB);
   },
   max: function(a, b) {
-    const varA = (a !== undefined) ? (isNaN(a) ? 1 : parseFloat(a)) : 0
-    const varB = (b !== undefined) ? (isNaN(b) ? 1 : parseFloat(b)) : 0
-    return Math.max(varA, varB)
+    const varA = (a !== undefined) ? (isNaN(a) ? 1 : parseFloat(a)) : 0;
+    const varB = (b !== undefined) ? (isNaN(b) ? 1 : parseFloat(b)) : 0;
+    return Math.max(varA, varB);
   },
   avg: function(a, b, c) {
-    const varA = (a !== undefined) ? (isNaN(a) ? 1 : parseFloat(a)) : 0
-    const varB = (b !== undefined) ? (isNaN(b) ? 1 : parseFloat(b)) : 0
-    return varA + varB
-  }
-}
+    const varA = (a !== undefined) ? (isNaN(a) ? 1 : parseFloat(a)) : 0;
+    const varB = (b !== undefined) ? (isNaN(b) ? 1 : parseFloat(b)) : 0;
+    return varA + varB;
+  },
+};
 
 const AggregatorFunctionDiv = {
   sum: false,
   min: false,
   max: false,
   count: false,
-  avg: true
-}
+  avg: true,
+};
 
 /** nested cube `(key) -> (group) -> aggregator` */
 export function getKGACube(rows, keyColumns, groupColumns, aggrColumns) {
@@ -613,67 +675,75 @@ export function getKGACube(rows, keyColumns, 
groupColumns, aggrColumns) {
     key: keyColumns.length !== 0,
     group: groupColumns.length !== 0,
     aggregator: aggrColumns.length !== 0,
-  }
+  };
 
-  let cube = {}
-  const entry = {}
+  let cube = {};
+  const entry = {};
 
-  const keyColumnName = keyColumns.map(c => c.name).join('.')
-  const groupNameSet = new Set()
-  const keyNameSet = new Set()
-  const selectorNameWithIndex = {} /** { selectorName: index } */
-  let indexCounter = 0
+  const keyColumnName = keyColumns.map((c) => c.name).join('.');
+  const groupNameSet = new Set();
+  const keyNameSet = new Set();
+  const selectorNameWithIndex = {}; /** { selectorName: index } */
+  let indexCounter = 0;
 
   for (let i = 0; i < rows.length; i++) {
-    const row = rows[i]
-    let e = entry
-    let c = cube
+    const row = rows[i];
+    let e = entry;
+    let c = cube;
 
     // key: add to entry
-    let mergedKeyName
+    let mergedKeyName;
     if (schema.key) {
-      mergedKeyName = keyColumns.map(c => row[c.index]).join('.')
-      if (!e[mergedKeyName]) { e[mergedKeyName] = { children: {}, } }
-      e = e[mergedKeyName].children
+      mergedKeyName = keyColumns.map((c) => row[c.index]).join('.');
+      if (!e[mergedKeyName]) {
+        e[mergedKeyName] = {children: {}};
+      }
+      e = e[mergedKeyName].children;
       // key: add to row
-      if (!c[mergedKeyName]) { c[mergedKeyName] = {} }
-      c = c[mergedKeyName]
+      if (!c[mergedKeyName]) {
+        c[mergedKeyName] = {};
+      }
+      c = c[mergedKeyName];
 
-      keyNameSet.add(mergedKeyName)
+      keyNameSet.add(mergedKeyName);
     }
 
-    let mergedGroupName
+    let mergedGroupName;
     if (schema.group) {
-      mergedGroupName = groupColumns.map(c => row[c.index]).join('.')
+      mergedGroupName = groupColumns.map((c) => row[c.index]).join('.');
 
       // add group to entry
-      if (!e[mergedGroupName]) { e[mergedGroupName] = { children: {}, } }
-      e = e[mergedGroupName].children
+      if (!e[mergedGroupName]) {
+        e[mergedGroupName] = {children: {}};
+      }
+      e = e[mergedGroupName].children;
       // add group to row
-      if (!c[mergedGroupName]) { c[mergedGroupName] = {} }
-      c = c[mergedGroupName]
-      groupNameSet.add(mergedGroupName)
+      if (!c[mergedGroupName]) {
+        c[mergedGroupName] = {};
+      }
+      c = c[mergedGroupName];
+      groupNameSet.add(mergedGroupName);
     }
 
     for (let a = 0; a < aggrColumns.length; a++) {
-      const aggrColumn = aggrColumns[a]
-      const aggrName = `${aggrColumn.name}(${aggrColumn.aggr})`
+      const aggrColumn = aggrColumns[a];
+      const aggrName = `${aggrColumn.name}(${aggrColumn.aggr})`;
 
       // update groupNameSet
       if (!mergedGroupName) {
-        groupNameSet.add(aggrName) /** aggr column name will be used as group 
name if group is empty */
+        groupNameSet.add(aggrName); /** aggr column name will be used as group 
name if group is empty */
       }
 
       // update selectorNameWithIndex
-      const selector = getSelectorName(mergedGroupName, aggrColumns.length, 
aggrName)
+      const selector = getSelectorName(mergedGroupName, aggrColumns.length, 
aggrName);
       if (typeof selectorNameWithIndex[selector] === 'undefined' /** value 
might be 0 */) {
-        selectorNameWithIndex[selector] = indexCounter
-        indexCounter = indexCounter + 1
+        selectorNameWithIndex[selector] = indexCounter;
+        indexCounter = indexCounter + 1;
       }
 
       // add aggregator to entry
       if (!e[aggrName]) {
-        e[aggrName] = { type: 'aggregator', order: aggrColumn, index: 
aggrColumn.index, }
+        e[aggrName] = {type: 'aggregator', order: aggrColumn, index: 
aggrColumn.index};
       }
 
       // add aggregatorName to row
@@ -682,26 +752,26 @@ export function getKGACube(rows, keyColumns, 
groupColumns, aggrColumns) {
           aggr: aggrColumn.aggr,
           value: (aggrColumn.aggr !== 'count') ? row[aggrColumn.index] : 1,
           count: 1,
-        }
+        };
       } else {
         const value = AggregatorFunctions[aggrColumn.aggr](
-          c[aggrName].value, row[aggrColumn.index], c[aggrName].count + 1)
+          c[aggrName].value, row[aggrColumn.index], c[aggrName].count + 1);
         const count = (AggregatorFunctionDiv[aggrColumn.aggr])
-          ? c[aggrName].count + 1 : c[aggrName].count
+          ? c[aggrName].count + 1 : c[aggrName].count;
 
-        c[aggrName].value = value
-        c[aggrName].count = count
+        c[aggrName].value = value;
+        c[aggrName].count = count;
       }
     } /** end loop for aggrColumns */
   }
 
-  let keyNames = null
+  let keyNames = null;
   if (!schema.key) {
-    const mergedGroupColumnName = groupColumns.map(c => c.name).join('.')
-    cube = { [mergedGroupColumnName]: cube, }
-    keyNames = [ mergedGroupColumnName, ]
+    const mergedGroupColumnName = groupColumns.map((c) => c.name).join('.');
+    cube = {[mergedGroupColumnName]: cube};
+    keyNames = [mergedGroupColumnName];
   } else {
-    keyNames = Object.keys(cube).sort() /** keys should be sorted */
+    keyNames = Object.keys(cube).sort(); /** keys should be sorted */
   }
 
   return {
@@ -711,7 +781,7 @@ export function getKGACube(rows, keyColumns, groupColumns, 
aggrColumns) {
     keyNames: keyNames,
     groupNameSet: groupNameSet,
     selectorNameWithIndex: selectorNameWithIndex,
-  }
+  };
 }
 
 /** nested cube `(key) -> aggregator -> (group)` for drill-down support */
@@ -720,98 +790,100 @@ export function getKAGCube(rows, keyColumns, 
groupColumns, aggrColumns) {
     key: keyColumns.length !== 0,
     group: groupColumns.length !== 0,
     aggregator: aggrColumns.length !== 0,
-  }
+  };
 
-  let cube = {}
+  let cube = {};
 
-  const keyColumnName = keyColumns.map(c => c.name).join('.')
-  const groupNameSet = new Set()
-  const keyNameSet = new Set()
-  const selectorNameWithIndex = {} /** { selectorName: index } */
-  let indexCounter = 0
+  const keyColumnName = keyColumns.map((c) => c.name).join('.');
+  const groupNameSet = new Set();
+  const keyNameSet = new Set();
+  const selectorNameWithIndex = {}; /** { selectorName: index } */
+  let indexCounter = 0;
 
   for (let i = 0; i < rows.length; i++) {
-    const row = rows[i]
-    let c = cube
+    const row = rows[i];
+    let c = cube;
 
     // key: add to entry
-    let mergedKeyName
+    let mergedKeyName;
     if (schema.key) {
-      mergedKeyName = keyColumns.map(c => row[c.index]).join('.')
+      mergedKeyName = keyColumns.map((c) => row[c.index]).join('.');
       // key: add to row
-      if (!c[mergedKeyName]) { c[mergedKeyName] = {} }
-      c = c[mergedKeyName]
+      if (!c[mergedKeyName]) {
+        c[mergedKeyName] = {};
+      }
+      c = c[mergedKeyName];
 
-      keyNameSet.add(mergedKeyName)
+      keyNameSet.add(mergedKeyName);
     }
 
-    let mergedGroupName
+    let mergedGroupName;
     if (schema.group) {
-      mergedGroupName = groupColumns.map(c => row[c.index]).join('.')
-      groupNameSet.add(mergedGroupName)
+      mergedGroupName = groupColumns.map((c) => row[c.index]).join('.');
+      groupNameSet.add(mergedGroupName);
     }
 
     for (let a = 0; a < aggrColumns.length; a++) {
-      const aggrColumn = aggrColumns[a]
-      const aggrName = `${aggrColumn.name}(${aggrColumn.aggr})`
+      const aggrColumn = aggrColumns[a];
+      const aggrName = `${aggrColumn.name}(${aggrColumn.aggr})`;
 
       // update groupNameSet
       if (!mergedGroupName) {
-        groupNameSet.add(aggrName) /** aggr column name will be used as group 
name if group is empty */
+        groupNameSet.add(aggrName); /** aggr column name will be used as group 
name if group is empty */
       }
 
       // update selectorNameWithIndex
-      const selector = getSelectorName(mergedKeyName, aggrColumns.length, 
aggrName)
+      const selector = getSelectorName(mergedKeyName, aggrColumns.length, 
aggrName);
       if (typeof selectorNameWithIndex[selector] === 'undefined' /** value 
might be 0 */) {
-        selectorNameWithIndex[selector] = indexCounter
-        indexCounter = indexCounter + 1
+        selectorNameWithIndex[selector] = indexCounter;
+        indexCounter = indexCounter + 1;
       }
 
       // add aggregatorName to row
       if (!c[aggrName]) {
-        const value = (aggrColumn.aggr !== 'count') ? row[aggrColumn.index] : 1
-        const count = 1
+        const value = (aggrColumn.aggr !== 'count') ? row[aggrColumn.index] : 
1;
+        const count = 1;
 
-        c[aggrName] = { aggr: aggrColumn.aggr, value: value, count: count, 
children: {}, }
+        c[aggrName] = {aggr: aggrColumn.aggr, value: value, count: count, 
children: {}};
       } else {
         const value = AggregatorFunctions[aggrColumn.aggr](
-          c[aggrName].value, row[aggrColumn.index], c[aggrName].count + 1)
+          c[aggrName].value, row[aggrColumn.index], c[aggrName].count + 1);
         const count = (AggregatorFunctionDiv[aggrColumn.aggr])
-          ? c[aggrName].count + 1 : c[aggrName].count
+          ? c[aggrName].count + 1 : c[aggrName].count;
 
-        c[aggrName].value = value
-        c[aggrName].count = count
+        c[aggrName].value = value;
+        c[aggrName].count = count;
       }
 
       // add aggregated group (for drill-down) to row iff group is enabled
       if (mergedGroupName) {
         if (!c[aggrName].children[mergedGroupName]) {
-          const value = (aggrColumn.aggr !== 'count') ? row[aggrColumn.index] 
: 1
-          const count = 1
+          const value = (aggrColumn.aggr !== 'count') ? row[aggrColumn.index] 
: 1;
+          const count = 1;
 
-          c[aggrName].children[mergedGroupName] = { value: value, count: 
count, }
+          c[aggrName].children[mergedGroupName] = {value: value, count: count};
         } else {
-          const drillDownedValue = c[aggrName].children[mergedGroupName].value
-          const drillDownedCount = c[aggrName].children[mergedGroupName].count
+          const drillDownedValue = c[aggrName].children[mergedGroupName].value;
+          const drillDownedCount = c[aggrName].children[mergedGroupName].count;
           const value = AggregatorFunctions[aggrColumn.aggr](
-            drillDownedValue, row[aggrColumn.index], drillDownedCount + 1)
+            drillDownedValue, row[aggrColumn.index], drillDownedCount + 1);
           const count = (AggregatorFunctionDiv[aggrColumn.aggr])
-            ? drillDownedCount + 1 : drillDownedCount
+            ? drillDownedCount + 1 : drillDownedCount;
 
-          c[aggrName].children[mergedGroupName].value = value
-          c[aggrName].children[mergedGroupName].count = count
+          c[aggrName].children[mergedGroupName].value = value;
+          c[aggrName].children[mergedGroupName].count = count;
         }
       }
     } /** end loop for aggrColumns */
   }
 
-  let keyNames = null
+  let keyNames = null;
   if (!schema.key) {
-    const mergedGroupColumnName = groupColumns.map(c => c.name).join('.')
-    cube = { [mergedGroupColumnName]: cube, }
-    keyNames = [ mergedGroupColumnName, ]
+    const mergedGroupColumnName = groupColumns.map((c) => c.name).join('.');
+    cube = {[mergedGroupColumnName]: cube};
+    keyNames = [mergedGroupColumnName];
   } else {
-    keyNames = Object.keys(cube).sort() /** keys should be sorted */
+    keyNames = Object.keys(cube).sort(); /** keys should be sorted */
   }
 
   return {
@@ -821,7 +893,7 @@ export function getKAGCube(rows, keyColumns, groupColumns, 
aggrColumns) {
     keyNames: keyNames,
     groupNameSet: groupNameSet,
     selectorNameWithIndex: selectorNameWithIndex,
-  }
+  };
 }
 /** nested cube `(key1) -> (key2) -> (group) -> aggregator` */
 export function getKKGACube(rows, key1Columns, key2Columns, groupColumns, 
aggrColumns) {
@@ -830,82 +902,98 @@ export function getKKGACube(rows, key1Columns, 
key2Columns, groupColumns, aggrCo
     key2: key2Columns.length !== 0,
     group: groupColumns.length !== 0,
     aggregator: aggrColumns.length !== 0,
-  }
+  };
 
-  let cube = {}
-  const entry = {}
+  let cube = {};
+  const entry = {};
 
-  const key1ColumnName = key1Columns.map(c => c.name).join('.')
-  const key1NameSet = {}
-  const key2ColumnName = key2Columns.map(c => c.name).join('.')
-  const key2NameSet = {}
-  const groupNameSet = new Set()
-  const selectorNameWithIndex = {} /** { selectorName: index } */
-  let indexCounter = 0
+  const key1ColumnName = key1Columns.map((c) => c.name).join('.');
+  const key1NameSet = {};
+  const key2ColumnName = key2Columns.map((c) => c.name).join('.');
+  const key2NameSet = {};
+  const groupNameSet = new Set();
+  const selectorNameWithIndex = {}; /** { selectorName: index } */
+  let indexCounter = 0;
 
   for (let i = 0; i < rows.length; i++) {
-    const row = rows[i]
-    let e = entry
-    let c = cube
+    const row = rows[i];
+    let e = entry;
+    let c = cube;
 
     // key1: add to entry
-    let mergedKey1Name
+    let mergedKey1Name;
     if (schema.key1) {
-      mergedKey1Name = key1Columns.map(c => row[c.index]).join('.')
-      if (!e[mergedKey1Name]) { e[mergedKey1Name] = { children: {}, } }
-      e = e[mergedKey1Name].children
+      mergedKey1Name = key1Columns.map((c) => row[c.index]).join('.');
+      if (!e[mergedKey1Name]) {
+        e[mergedKey1Name] = {children: {}};
+      }
+      e = e[mergedKey1Name].children;
       // key1: add to row
-      if (!c[mergedKey1Name]) { c[mergedKey1Name] = {} }
-      c = c[mergedKey1Name]
+      if (!c[mergedKey1Name]) {
+        c[mergedKey1Name] = {};
+      }
+      c = c[mergedKey1Name];
 
-      if (!key1NameSet[mergedKey1Name]) { key1NameSet[mergedKey1Name] = true }
+      if (!key1NameSet[mergedKey1Name]) {
+        key1NameSet[mergedKey1Name] = true;
+      }
     }
 
     // key2: add to entry
-    let mergedKey2Name
+    let mergedKey2Name;
     if (schema.key2) {
-      mergedKey2Name = key2Columns.map(c => row[c.index]).join('.')
-      if (!e[mergedKey2Name]) { e[mergedKey2Name] = { children: {}, } }
-      e = e[mergedKey2Name].children
+      mergedKey2Name = key2Columns.map((c) => row[c.index]).join('.');
+      if (!e[mergedKey2Name]) {
+        e[mergedKey2Name] = {children: {}};
+      }
+      e = e[mergedKey2Name].children;
       // key2: add to row
-      if (!c[mergedKey2Name]) { c[mergedKey2Name] = {} }
-      c = c[mergedKey2Name]
+      if (!c[mergedKey2Name]) {
+        c[mergedKey2Name] = {};
+      }
+      c = c[mergedKey2Name];
 
-      if (!key2NameSet[mergedKey2Name]) { key2NameSet[mergedKey2Name] = true }
+      if (!key2NameSet[mergedKey2Name]) {
+        key2NameSet[mergedKey2Name] = true;
+      }
     }
 
-    let mergedGroupName
+    let mergedGroupName;
     if (schema.group) {
-      mergedGroupName = groupColumns.map(c => row[c.index]).join('.')
+      mergedGroupName = groupColumns.map((c) => row[c.index]).join('.');
 
       // add group to entry
-      if (!e[mergedGroupName]) { e[mergedGroupName] = { children: {}, } }
-      e = e[mergedGroupName].children
+      if (!e[mergedGroupName]) {
+        e[mergedGroupName] = {children: {}};
+      }
+      e = e[mergedGroupName].children;
       // add group to row
-      if (!c[mergedGroupName]) { c[mergedGroupName] = {} }
-      c = c[mergedGroupName]
-      groupNameSet.add(mergedGroupName)
+      if (!c[mergedGroupName]) {
+        c[mergedGroupName] = {};
+      }
+      c = c[mergedGroupName];
+      groupNameSet.add(mergedGroupName);
     }
 
     for (let a = 0; a < aggrColumns.length; a++) {
-      const aggrColumn = aggrColumns[a]
-      const aggrName = `${aggrColumn.name}(${aggrColumn.aggr})`
+      const aggrColumn = aggrColumns[a];
+      const aggrName = `${aggrColumn.name}(${aggrColumn.aggr})`;
 
       // update groupNameSet
       if (!mergedGroupName) {
-        groupNameSet.add(aggrName) /** aggr column name will be used as group 
name if group is empty */
+        groupNameSet.add(aggrName); /** aggr column name will be used as group 
name if group is empty */
       }
 
       // update selectorNameWithIndex
-      const selector = getSelectorName(mergedGroupName, aggrColumns.length, 
aggrName)
+      const selector = getSelectorName(mergedGroupName, aggrColumns.length, 
aggrName);
       if (typeof selectorNameWithIndex[selector] === 'undefined' /** value 
might be 0 */) {
-        selectorNameWithIndex[selector] = indexCounter
-        indexCounter = indexCounter + 1
+        selectorNameWithIndex[selector] = indexCounter;
+        indexCounter = indexCounter + 1;
       }
 
       // add aggregator to entry
       if (!e[aggrName]) {
-        e[aggrName] = { type: 'aggregator', order: aggrColumn, index: 
aggrColumn.index, }
+        e[aggrName] = {type: 'aggregator', order: aggrColumn, index: 
aggrColumn.index};
       }
 
       // add aggregatorName to row
@@ -914,21 +1002,21 @@ export function getKKGACube(rows, key1Columns, 
key2Columns, groupColumns, aggrCo
           aggr: aggrColumn.aggr,
           value: (aggrColumn.aggr !== 'count') ? row[aggrColumn.index] : 1,
           count: 1,
-        }
+        };
       } else {
         const value = AggregatorFunctions[aggrColumn.aggr](
-          c[aggrName].value, row[aggrColumn.index], c[aggrName].count + 1)
+          c[aggrName].value, row[aggrColumn.index], c[aggrName].count + 1);
         const count = (AggregatorFunctionDiv[aggrColumn.aggr])
-          ? c[aggrName].count + 1 : c[aggrName].count
+          ? c[aggrName].count + 1 : c[aggrName].count;
 
-        c[aggrName].value = value
-        c[aggrName].count = count
+        c[aggrName].value = value;
+        c[aggrName].count = count;
       }
     } /** end loop for aggrColumns */
   }
 
-  let key1Names = Object.keys(key1NameSet).sort() /** keys should be sorted */
-  let key2Names = Object.keys(key2NameSet).sort() /** keys should be sorted */
+  let key1Names = Object.keys(key1NameSet).sort(); /** keys should be sorted */
+  let key2Names = Object.keys(key2NameSet).sort(); /** keys should be sorted */
 
   return {
     cube: cube,
@@ -939,59 +1027,61 @@ export function getKKGACube(rows, key1Columns, 
key2Columns, groupColumns, aggrCo
     key2Names: key2Names,
     groupNameSet: groupNameSet,
     selectorNameWithIndex: selectorNameWithIndex,
-  }
+  };
 }
 
 export function getSelectorName(mergedGroupName, aggrColumnLength, 
aggrColumnName) {
   if (!mergedGroupName) {
-    return aggrColumnName
+    return aggrColumnName;
   } else {
     return (aggrColumnLength > 1)
-      ? `${mergedGroupName} / ${aggrColumnName}` : mergedGroupName
+      ? `${mergedGroupName} / ${aggrColumnName}` : mergedGroupName;
   }
 }
 
 export function getCubeValue(obj, aggregator, aggrColumnName) {
-  let value = null /** default is null */
+  let value = null; /** default is null */
   try {
     /** if AVG or COUNT, calculate it now, previously we can't because we were 
doing accumulation */
     if (aggregator === Aggregator.AVG) {
-      value = obj[aggrColumnName].value / obj[aggrColumnName].count
+      value = obj[aggrColumnName].value / obj[aggrColumnName].count;
     } else if (aggregator === Aggregator.COUNT) {
-      value = obj[aggrColumnName].value
+      value = obj[aggrColumnName].value;
     } else {
-      value = obj[aggrColumnName].value
+      value = obj[aggrColumnName].value;
     }
 
-    if (typeof value === 'undefined') { value = null }
+    if (typeof value === 'undefined') {
+      value = null;
+    }
   } catch (error) { /** iognore */ }
 
-  return value
+  return value;
 }
 
 export function getNameWithIndex(names) {
-  const nameWithIndex = {}
+  const nameWithIndex = {};
 
   for (let i = 0; i < names.length; i++) {
-    const name = names[i]
-    nameWithIndex[name] = i
+    const name = names[i];
+    nameWithIndex[name] = i;
   }
 
-  return nameWithIndex
+  return nameWithIndex;
 }
 
 export function getArrayRowsFromKKGACube(cube, schema, aggregatorColumns,
                                          key1Names, key2Names, groupNameSet, 
selectorNameWithIndex) {
-  const sortedSelectors = Object.keys(selectorNameWithIndex).sort()
-  const sortedSelectorNameWithIndex = getNameWithIndex(sortedSelectors)
+  const sortedSelectors = Object.keys(selectorNameWithIndex).sort();
+  const sortedSelectorNameWithIndex = getNameWithIndex(sortedSelectors);
 
-  const selectorRows = new Array(sortedSelectors.length)
-  const key1NameWithIndex = getNameWithIndex(key1Names)
-  const key2NameWithIndex = getNameWithIndex(key2Names)
+  const selectorRows = new Array(sortedSelectors.length);
+  const key1NameWithIndex = getNameWithIndex(key1Names);
+  const key2NameWithIndex = getNameWithIndex(key2Names);
 
   fillSelectorRows(schema, cube, selectorRows,
     aggregatorColumns, sortedSelectorNameWithIndex,
-    key1Names, key2Names, key1NameWithIndex, key2NameWithIndex)
+    key1Names, key2Names, key1NameWithIndex, key2NameWithIndex);
 
   return {
     key1NameWithIndex: key1NameWithIndex,
@@ -999,7 +1089,7 @@ export function getArrayRowsFromKKGACube(cube, schema, 
aggregatorColumns,
     transformed: selectorRows,
     groupNames: Array.from(groupNameSet).sort(),
     sortedSelectors: sortedSelectors,
-  }
+  };
 }
 
 /** truly mutable style func. will return nothing */
@@ -1009,90 +1099,94 @@ export function fillSelectorRows(schema, cube, 
selectorRows,
   function fill(grouped, mergedGroupName, key1Name, key2Name) {
     // should iterate aggrColumns in the most nested loop to utilize memory 
locality
     for (let aggrColumn of aggrColumns) {
-      const aggrName = `${aggrColumn.name}(${aggrColumn.aggr})`
-      const value = getCubeValue(grouped, aggrColumn.aggr, aggrName)
-      const selector = getSelectorName(mergedGroupName, aggrColumns.length, 
aggrName)
-      const selectorIndex = selectorNameWithIndex[selector]
+      const aggrName = `${aggrColumn.name}(${aggrColumn.aggr})`;
+      const value = getCubeValue(grouped, aggrColumn.aggr, aggrName);
+      const selector = getSelectorName(mergedGroupName, aggrColumns.length, 
aggrName);
+      const selectorIndex = selectorNameWithIndex[selector];
 
       if (typeof selectorRows[selectorIndex] === 'undefined') {
-        selectorRows[selectorIndex] = { selector: selector, value: [], }
+        selectorRows[selectorIndex] = {selector: selector, value: []};
       }
 
-      const row = { aggregated: value, }
+      const row = {aggregated: value};
 
-      if (typeof key1Name !== 'undefined') { row.key1 = key1Name }
-      if (typeof key2Name !== 'undefined') { row.key2 = key2Name }
+      if (typeof key1Name !== 'undefined') {
+        row.key1 = key1Name;
+      }
+      if (typeof key2Name !== 'undefined') {
+        row.key2 = key2Name;
+      }
 
-      selectorRows[selectorIndex].value.push(row)
+      selectorRows[selectorIndex].value.push(row);
     }
   }
 
   function iterateGroupNames(keyed, key1Name, key2Name) {
     if (!schema.group) {
-      fill(keyed, undefined, key1Name, key2Name)
+      fill(keyed, undefined, key1Name, key2Name);
     } else {
       // assuming sparse distribution (usual case)
       // otherwise we need to iterate using `groupNameSet`
-      const availableGroupNames = Object.keys(keyed)
+      const availableGroupNames = Object.keys(keyed);
 
       for (let groupName of availableGroupNames) {
-        const grouped = keyed[groupName]
-        fill(grouped, groupName, key1Name, key2Name)
+        const grouped = keyed[groupName];
+        fill(grouped, groupName, key1Name, key2Name);
       }
     }
   }
 
   if (schema.key1 && schema.key2) {
     for (let key1Name of key1Names) {
-      const key1ed = cube[key1Name]
+      const key1ed = cube[key1Name];
 
       // assuming sparse distribution (usual case)
       // otherwise we need to iterate using `key2Names`
-      const availableKey2Names = Object.keys(key1ed)
+      const availableKey2Names = Object.keys(key1ed);
 
       for (let key2Name of availableKey2Names) {
-        const keyed = key1ed[key2Name]
-        iterateGroupNames(keyed, key1Name, key2Name)
+        const keyed = key1ed[key2Name];
+        iterateGroupNames(keyed, key1Name, key2Name);
       }
     }
   } else if (schema.key1 && !schema.key2) {
     for (let key1Name of key1Names) {
-      const keyed = cube[key1Name]
-      iterateGroupNames(keyed, key1Name, undefined)
+      const keyed = cube[key1Name];
+      iterateGroupNames(keyed, key1Name, undefined);
     }
   } else if (!schema.key1 && schema.key2) {
     for (let key2Name of key2Names) {
-      const keyed = cube[key2Name]
-      iterateGroupNames(keyed, undefined, key2Name)
+      const keyed = cube[key2Name];
+      iterateGroupNames(keyed, undefined, key2Name);
     }
   } else {
-    iterateGroupNames(cube, undefined, undefined)
+    iterateGroupNames(cube, undefined, undefined);
   }
 }
 
 export function getArrayRowsFromKGACube(cube, schema, aggregatorColumns,
                                         keyColumnName, keyNames, groupNameSet,
                                         selectorNameWithIndex) {
-  const sortedSelectors = Object.keys(selectorNameWithIndex).sort()
-  const sortedSelectorNameWithIndex = getNameWithIndex(sortedSelectors)
+  const sortedSelectors = Object.keys(selectorNameWithIndex).sort();
+  const sortedSelectorNameWithIndex = getNameWithIndex(sortedSelectors);
 
-  const keyArrowRows = new Array(sortedSelectors.length)
-  const keyNameWithIndex = getNameWithIndex(keyNames)
+  const keyArrowRows = new Array(sortedSelectors.length);
+  const keyNameWithIndex = getNameWithIndex(keyNames);
 
   for (let i = 0; i < keyNames.length; i++) {
-    const key = keyNames[i]
+    const key = keyNames[i];
 
-    const obj = cube[key]
+    const obj = cube[key];
     fillArrayRow(schema, aggregatorColumns, obj,
       groupNameSet, sortedSelectorNameWithIndex,
-      key, keyNames, keyArrowRows, keyNameWithIndex)
+      key, keyNames, keyArrowRows, keyNameWithIndex);
   }
 
   return {
     transformed: keyArrowRows,
     groupNames: Array.from(groupNameSet).sort(),
     sortedSelectors: sortedSelectors,
-  }
+  };
 }
 
 /** truly mutable style func. will return nothing, just modify `keyArrayRows` 
*/
@@ -1100,34 +1194,34 @@ export function fillArrayRow(schema, aggrColumns, obj,
                              groupNameSet, selectorNameWithIndex,
                              keyName, keyNames, keyArrayRows, 
keyNameWithIndex) {
   function fill(target, mergedGroupName, aggr, aggrName) {
-    const value = getCubeValue(target, aggr, aggrName)
-    const selector = getSelectorName(mergedGroupName, aggrColumns.length, 
aggrName)
-    const selectorIndex = selectorNameWithIndex[selector]
-    const keyIndex = keyNameWithIndex[keyName]
+    const value = getCubeValue(target, aggr, aggrName);
+    const selector = getSelectorName(mergedGroupName, aggrColumns.length, 
aggrName);
+    const selectorIndex = selectorNameWithIndex[selector];
+    const keyIndex = keyNameWithIndex[keyName];
 
     if (typeof keyArrayRows[selectorIndex] === 'undefined') {
       keyArrayRows[selectorIndex] = {
-        selector: selector, value: new Array(keyNames.length)
-      }
+        selector: selector, value: new Array(keyNames.length),
+      };
     }
-    keyArrayRows[selectorIndex].value[keyIndex] = value
+    keyArrayRows[selectorIndex].value[keyIndex] = value;
   }
 
   /** when group is empty */
   if (!schema.group) {
     for (let i = 0; i < aggrColumns.length; i++) {
-      const aggrColumn = aggrColumns[i]
-      const aggrName = `${aggrColumn.name}(${aggrColumn.aggr})`
-      fill(obj, undefined, aggrColumn.aggr, aggrName)
+      const aggrColumn = aggrColumns[i];
+      const aggrName = `${aggrColumn.name}(${aggrColumn.aggr})`;
+      fill(obj, undefined, aggrColumn.aggr, aggrName);
     }
   } else {
     for (let i = 0; i < aggrColumns.length; i++) {
-      const aggrColumn = aggrColumns[i]
-      const aggrName = `${aggrColumn.name}(${aggrColumn.aggr})`
+      const aggrColumn = aggrColumns[i];
+      const aggrName = `${aggrColumn.name}(${aggrColumn.aggr})`;
 
       for (let groupName of groupNameSet) {
-        const grouped = obj[groupName]
-        fill(grouped, groupName, aggrColumn.aggr, aggrName)
+        const grouped = obj[groupName];
+        fill(grouped, groupName, aggrColumn.aggr, aggrName);
       }
     }
   }
@@ -1137,81 +1231,83 @@ export function getObjectRowsFromKGACube(cube, schema, 
aggregatorColumns,
                                          keyColumnName, keyNames, groupNameSet,
                                          selectorNameWithIndex) {
   const rows = keyNames.reduce((acc, key) => {
-    const obj = cube[key]
-    const row = getObjectRow(schema, aggregatorColumns, obj, groupNameSet)
+    const obj = cube[key];
+    const row = getObjectRow(schema, aggregatorColumns, obj, groupNameSet);
 
-    if (schema.key) { row[keyColumnName] = key }
-    acc.push(row)
+    if (schema.key) {
+      row[keyColumnName] = key;
+    }
+    acc.push(row);
 
-    return acc
-  }, [])
+    return acc;
+  }, []);
 
   return {
     transformed: rows,
     sortedSelectors: Object.keys(selectorNameWithIndex).sort(),
     groupNames: Array.from(groupNameSet).sort(),
-  }
+  };
 }
 
 export function getObjectRow(schema, aggrColumns, obj, groupNameSet) {
-  const row = {}
+  const row = {};
 
   function fill(row, target, mergedGroupName, aggr, aggrName) {
-    const value = getCubeValue(target, aggr, aggrName)
-    const selector = getSelectorName(mergedGroupName, aggrColumns.length, 
aggrName)
-    row[selector] = value
+    const value = getCubeValue(target, aggr, aggrName);
+    const selector = getSelectorName(mergedGroupName, aggrColumns.length, 
aggrName);
+    row[selector] = value;
   }
 
   /** when group is empty */
   if (!schema.group) {
     for (let i = 0; i < aggrColumns.length; i++) {
-      const aggrColumn = aggrColumns[i]
-      const aggrName = `${aggrColumn.name}(${aggrColumn.aggr})`
+      const aggrColumn = aggrColumns[i];
+      const aggrName = `${aggrColumn.name}(${aggrColumn.aggr})`;
 
-      fill(row, obj, undefined, aggrColumn.aggr, aggrName)
+      fill(row, obj, undefined, aggrColumn.aggr, aggrName);
     }
 
-    return row
+    return row;
   }
 
   /** when group is specified */
   for (let i = 0; i < aggrColumns.length; i++) {
-    const aggrColumn = aggrColumns[i]
-    const aggrName = `${aggrColumn.name}(${aggrColumn.aggr})`
+    const aggrColumn = aggrColumns[i];
+    const aggrName = `${aggrColumn.name}(${aggrColumn.aggr})`;
 
     for (let groupName of groupNameSet) {
-      const grouped = obj[groupName]
+      const grouped = obj[groupName];
 
       if (grouped) {
-        fill(row, grouped, groupName, aggrColumn.aggr, aggrName)
+        fill(row, grouped, groupName, aggrColumn.aggr, aggrName);
       }
     }
   }
 
-  return row
+  return row;
 }
 
 export function getDrilldownRowsFromKAGCube(cube, schema, aggregatorColumns,
                                             keyColumnName, keyNames, 
groupNameSet, selectorNameWithIndex) {
-  const sortedSelectors = Object.keys(selectorNameWithIndex).sort()
-  const sortedSelectorNameWithIndex = getNameWithIndex(sortedSelectors)
+  const sortedSelectors = Object.keys(selectorNameWithIndex).sort();
+  const sortedSelectorNameWithIndex = getNameWithIndex(sortedSelectors);
 
-  const rows = new Array(sortedSelectors.length)
+  const rows = new Array(sortedSelectors.length);
 
-  const groupNames = Array.from(groupNameSet).sort()
+  const groupNames = Array.from(groupNameSet).sort();
 
-  keyNames.map(key => {
-    const obj = cube[key]
+  keyNames.map((key) => {
+    const obj = cube[key];
     fillDrillDownRow(schema, obj, rows, key,
-      sortedSelectorNameWithIndex, aggregatorColumns, groupNames)
-  })
+      sortedSelectorNameWithIndex, aggregatorColumns, groupNames);
+  });
 
   return {
     transformed: rows,
     groupNames: groupNames,
     sortedSelectors: sortedSelectors,
     sortedSelectorNameWithIndex: sortedSelectorNameWithIndex,
-  }
+  };
 }
 
 /** truly mutable style func. will return nothing, just modify `rows` */
@@ -1219,27 +1315,27 @@ export function fillDrillDownRow(schema, obj, rows, key,
                                  selectorNameWithIndex, aggrColumns, 
groupNames) {
   /** when group is empty */
   for (let i = 0; i < aggrColumns.length; i++) {
-    const row = {}
-    const aggrColumn = aggrColumns[i]
-    const aggrName = `${aggrColumn.name}(${aggrColumn.aggr})`
+    const row = {};
+    const aggrColumn = aggrColumns[i];
+    const aggrName = `${aggrColumn.name}(${aggrColumn.aggr})`;
 
-    const value = getCubeValue(obj, aggrColumn.aggr, aggrName)
-    const selector = getSelectorName((schema.key) ? key : undefined, 
aggrColumns.length, aggrName)
+    const value = getCubeValue(obj, aggrColumn.aggr, aggrName);
+    const selector = getSelectorName((schema.key) ? key : undefined, 
aggrColumns.length, aggrName);
 
-    const selectorIndex = selectorNameWithIndex[selector]
-    row.value = value
-    row.drillDown = []
-    row.selector = selector
+    const selectorIndex = selectorNameWithIndex[selector];
+    row.value = value;
+    row.drillDown = [];
+    row.selector = selector;
 
     if (schema.group) {
-      row.drillDown = []
+      row.drillDown = [];
 
       for (let groupName of groupNames) {
-        const value = getCubeValue(obj[aggrName].children, aggrColumn.aggr, 
groupName)
-        row.drillDown.push({ group: groupName, value: value, })
+        const value = getCubeValue(obj[aggrName].children, aggrColumn.aggr, 
groupName);
+        row.drillDown.push({group: groupName, value: value});
       }
     }
 
-    rows[selectorIndex] = row
+    rows[selectorIndex] = row;
   }
 }

Reply via email to