Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
_jespers_
Partner - Creator II
Partner - Creator II

Trouble creating table with Visualization API

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?

1 Reply
evanplancaster
Contributor III
Contributor III

@_jespers_ , I know this is an old post, but were you ever able to figure this out? I'm having a similar issue.

At one point, I was able to get the table to render by setting the height manually, as you mentioned, but I was also needing to add in some custom CSS, and I lost the table upon doing that.

Thanks in advance for any advice you can offer here!