toggleDataView method

Note: STABLE.
This API is reliable and breaking changes are unlikely.

toggleDataView()

Creates a DataView object if it does not already exist and toggles the data view. Tells the visualization it has been resized and should re-paint.

Note: DataView lets you toggle any QVisualization into a table that shows the data behind the chart.

Version history

Introduced Qlik Sense June 2018

Disclaimer

The element that is provided as a parameter to the QVisualization.show method must have CSS property position set to relative and must not have any padding.

If these rules are not followed, the visualization object may not calculate its width and height correctly and you may not be able to scroll and navigate after toggling data view.

Proposed action  

Wrap the element with another element. The wrapper can then be styled without any limitations.

Example

var app = qlik.openApp('c31e2aba-3b46-4b13-8b87-c5c2514dea1d');
app.visualization.get('xGhjKl').then(function(vis){
  vis.show("QV01");
  vis.toggleDataView().then(function(toggled){
    if(toggled){
      this.getElementsByClassName('qv-st')[0].focus();
    }
  }
});

Did this information help you?

Thanks for letting us know. Is there anything you'd like to tell us about this topic?

Can you tell us why it did not help you and how we can improve it?