Qlik Community

Ask a Question

App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
Join us for a live Q&A! September 21, 10 AM ET - Onboarding Fast in Qlik Sense SaaS! REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
maxim1500
Partner
Partner

Getting data from chart hypercube

Hi,

I am trying to get the raw data from the chart model. For most of the charts, the data gets filled into qHyperCube.qDataPages. But for widgets such as stacked barcharts and tables, it always stays empty.

I tried getting the data using the QTable api, using:

        var table = qlik.table(model);

        var listener = function () {

            console.log("data binded");

        };

        table.OnData.bind(listener);

But the listener is never called.

Is there another way of getting the data for those widgets?

Thanks!

1 Solution

Accepted Solutions
maxim1500
Partner
Partner
Author

Found the answer in this post:

Get data from table or chart

      // Fetch a page of data. A single page can maximum contain 10000 

      // cells. Calculate the page size and number of pages based of qSize 

      // and fetch accordingly. 

      model.getHyperCubeData('/qHyperCubeDef', [{ 

        qTop: 0,  

        qLeft: 0,  

        qWidth: 10,  

        qHeight: 1000 

      }]).then(data => console.log(data)) 

View solution in original post

2 Replies
maxim1500
Partner
Partner
Author

Found the answer in this post:

Get data from table or chart

      // Fetch a page of data. A single page can maximum contain 10000 

      // cells. Calculate the page size and number of pages based of qSize 

      // and fetch accordingly. 

      model.getHyperCubeData('/qHyperCubeDef', [{ 

        qTop: 0,  

        qLeft: 0,  

        qWidth: 10,  

        qHeight: 1000 

      }]).then(data => console.log(data)) 

View solution in original post

sebastian_serva
Partner
Partner

Hi Maxime,

Does your promise execute every time there's a model change? (ie when selections change).

Seb