Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
bekahbeets
Creator
Creator

creating extension gives 'undefined' error.

I am using qliksense desktop and the devhub on 4848 to follow tutorials to create my first extension. However, I have been stumped for 3 days by this error. It happens when I click to select a dimension or measure.

createExtError.PNG

Contents of the js file:

define(["jquery", "text!./com-qliktech-helloworld.css","./d3.min"], function($, cssContent) {"use strict";

  $("<style>").html(cssContent).appendTo("head");

  return {

  initialProperties : {

  version: 1.0,

  qHyperCubeDef : {

  qDimensions : [],

  qMeasures : [],

  qInitialDataFetch : [{

  qWidth : 4,

  qHeight : 1000

  }]

  }

  },

  definition : {

  type : "items",

  component : "accordion",

  items : {

  dimensions : {

  uses : "dimensions",

  min : 2,

  max : 2

  },

  measures : {

  uses : "measures",

  min : 2,

  max : 2

  },

  sorting : {

  uses : "sorting"

  },

  settings : {

  uses : "settings"

  }

  }

  },

  paint : function($element,layout) {

  console.log($element);

  console.log(layout);

        }

  };

});

3 Replies
ErikWetterberg

Hi,

Try recreating the extension object (that is removing the one you have from the sheet and dragging your extension again into the sheet). This might happen if your extension object is created without the dimension and/or measure arrays.

Hope this helps

Erik Wetterberg

bekahbeets
Creator
Creator
Author

What do you mean create it without the dimension or measure arrays? Are you talking about in the js code or in the visualization on the desktop? Because I'm supposed to be able to add them from the desktop.

ErikWetterberg

In the property panel you add dimensions and measures to the arrays, but it does not create the arrays, that has to be done in initialProperties.

Erik