0 Replies Latest reply: Nov 21, 2017 5:07 AM by Jesper Snihs RSS

    Trouble creating table with Visualization API

    Jesper Snihs

      I have some trouble generating a table with the Visualization API. The table is partly generated, the title is set, the total row is set (but it is hidden by default, need to set the height to a specific height on the element for it to be visible), but the rest of the rows is not set.

       

      This is the .js file:

      define( [
              "qlik", 
              "jquery", 
              "text!./template.html"
          ],
          function ( qlik, $, template) {
      
              var app = qlik.currApp(this);
      
              return {
                  template: template,
                  support: {
                      snapshot: true,
                      export: true,
                      exportData: true
                  },
                  paint: function ($element, layout) {
                      app.visualization.create('table', ["Dim1", "=Count(Dim1)"], {title:"Table Title"}).then(function(table) {
                          table.show("QV01");
                      });
                      
                      return qlik.Promise.resolve();
                  },
                  controller: ['$scope', function ( $scope ) {
                  }]
              };
      
          } );
      

       

      The template file:

      <div qv-extension style="height: 100%; position: relative; overflow: auto;" class="ng-scope">
          <div id="QV01"></div>
      </div>
      

       

      Any idea why this is happening?